VirtualBox

Ignore:
Timestamp:
Dec 4, 2015 2:23:37 PM (9 years ago)
Author:
vboxsync
Message:

VBoxDTrace: Extpack conversion fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c

    r53694 r58987  
    5757# include <iprt/path.h>
    5858# include <iprt/stream.h>
     59# include <iprt/buildconfig.h>
     60# include "../../../../../Main/include/ExtPackUtil.h"
    5961#endif /* VBOX */
    6062
     
    972974        }
    973975
    974         /** @todo this needs to be changed if this becomes and extension pack. */
    975976        rc = RTPathAppPrivateArch(szModPath, sizeof(szModPath));
     977        if (RT_SUCCESS(rc))
     978                rc = RTPathAppend(szModPath, sizeof(szModPath),
     979                                  VBOX_EXTPACK_INSTALL_DIR RTPATH_SLASH_STR VBOX_EXTPACK_VBOXDTRACE_MANGLED_NAME);
     980        if (RT_SUCCESS(rc))
     981                rc = RTPathAppend(szModPath, sizeof(szModPath), RTBldCfgTargetDotArch());
     982        if (RT_SUCCESS(rc))
     983                rc = RTPathAppend(szModPath, sizeof(szModPath), "VBoxDTraceR0.r0");
    976984        if (RT_SUCCESS(rc)) {
    977                 rc = RTPathAppend(szModPath, sizeof(szModPath), "VBoxDTraceR0.r0");
    978                 if (RT_SUCCESS(rc))
    979                 {
    980                         PRTERRINFO pErrInfo = RTErrInfoAlloc(1024);
    981                         rc = SUPR3LoadModule(szModPath, "VBoxDTraceR0.r0", &pvImageBase, pErrInfo);
    982                         if (RT_FAILURE(rc)) {
    983                                 RTStrmPrintf(g_pStdErr, "SUPR3LoadModule: %s -> %Rrc; %s\n", szModPath, rc, pErrInfo->pszMsg);
    984                                 RTErrInfoFree(pErrInfo);
    985                                 return (set_open_errno(dtp, errp, EDT_NOTLOADED));
    986                         }
     985                PRTERRINFO pErrInfo = RTErrInfoAlloc(1024);
     986                rc = SUPR3LoadModule(szModPath, "VBoxDTraceR0.r0", &pvImageBase, pErrInfo);
     987                if (RT_FAILURE(rc)) {
     988                        RTStrmPrintf(g_pStdErr, "SUPR3LoadModule: %s -> %Rrc; %s\n", szModPath, rc, pErrInfo->pszMsg);
    987989                        RTErrInfoFree(pErrInfo);
     990                        return (set_open_errno(dtp, errp, EDT_NOTLOADED));
    988991                }
     992                RTErrInfoFree(pErrInfo);
    989993        }
    990994        if (RT_FAILURE(rc)) {
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