VirtualBox

儲存庫 vbox 的更動 37280


忽略:
時間撮記:
2011-5-31 下午09:31:19 (13 年 以前)
作者:
vboxsync
訊息:

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

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • 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)
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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