VirtualBox

Ignore:
Timestamp:
May 31, 2011 9:31:19 PM (14 years ago)
Author:
vboxsync
Message:

SUPDrv-solaris.c: ugly module loading hack for S10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r37249 r37280  
    909909     * specify a root path.
    910910     */
     911    /** @todo change this to use modctl and use_path=0. */
    911912    const char *pszName = RTPathFilename(pszFilename);
    912913    AssertReturn(pszName, VERR_INVALID_PARAMETER);
    913     char *pszSubDir = RTStrAPrintf2("../../../../../../../../../../../%.*s", pszName - pszFilename, pszFilename);
     914    char *pszSubDir = RTStrAPrintf2("../../../../../../../../../../..%.*s", pszName - pszFilename - 1, pszFilename);
    914915    if (!pszSubDir)
    915916        return VERR_NO_STR_MEMORY;
    916 
    917917    int idMod = modload(pszSubDir, pszName);
     918    if (idMod == -1)
     919    {
     920        /* This is an horrible hack for avoiding the mod-present check in
     921           modrload on S10.  Fortunately, nobody else seems to be using that
     922           variable... */
     923        extern int swaploaded;
     924        int saved_swaploaded = swaploaded;
     925        swaploaded = 0;
     926        idMod = modload(pszSubDir, pszName);
     927        swaploaded = saved_swaploaded;
     928    }
    918929    RTStrFree(pszSubDir);
    919930    if (idMod == -1)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette