VirtualBox

Ignore:
Timestamp:
Oct 10, 2013 6:36:15 PM (11 years ago)
Author:
vboxsync
Message:

More ext -> suff corrections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/ldr/ldrNative.cpp

    r48935 r49040  
    183183    *phLdrMod = NIL_RTLDRMOD;
    184184    AssertPtrReturn(pszFilename, VERR_INVALID_PARAMETER);
    185     AssertMsgReturn(!RTPathHavePath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER);
     185    AssertMsgReturn(!RTPathHasPath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER);
    186186
    187187    /*
     
    191191    AssertMsgReturn(cchFilename < (RTPATH_MAX / 4) * 3, ("%zu\n", cchFilename), VERR_INVALID_PARAMETER);
    192192
    193     const char *pszExt = "";
    194     if (!RTPathHaveExt(pszFilename))
    195         pszExt = RTLdrGetSuff();
     193    const char *pszSuffix = "";
     194    if (!RTPathHasSuffix(pszFilename))
     195        pszSuffix = RTLdrGetSuff();
    196196
    197197    /*
    198198     * Let the platform specific code do the rest.
    199199     */
    200     int rc = rtldrNativeLoadSystem(pszFilename, pszExt, fNoUnload ? RTLDRLOAD_FLAGS_NO_UNLOAD : 0, phLdrMod);
     200    int rc = rtldrNativeLoadSystem(pszFilename, pszSuffix, fNoUnload ? RTLDRLOAD_FLAGS_NO_UNLOAD : 0, phLdrMod);
    201201    LogFlow(("RTLdrLoadSystem: returns %Rrc\n", rc));
    202202    return rc;
     
    240240    *phLdrMod = NIL_RTLDRMOD;
    241241    AssertPtrReturn(pszFilename, VERR_INVALID_PARAMETER);
    242     AssertMsgReturn(!RTPathHavePath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER);
     242    AssertMsgReturn(!RTPathHasPath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER);
    243243
    244244    /*
     
    248248    AssertMsgReturn(cchFilename < (RTPATH_MAX / 4) * 3, ("%zu\n", cchFilename), VERR_INVALID_PARAMETER);
    249249
    250     const char *pszExt = "";
    251     size_t cchExt = 0;
    252     if (!RTPathHaveExt(pszFilename))
     250    const char *pszSuffix = "";
     251    size_t cchSuffix = 0;
     252    if (!RTPathHasSuffix(pszFilename))
    253253    {
    254         pszExt = RTLdrGetSuff();
    255         cchExt = strlen(pszExt);
     254        pszSuffix = RTLdrGetSuff();
     255        cchSuffix = strlen(pszSuffix);
    256256    }
    257257
     
    260260     */
    261261    char szPath[RTPATH_MAX];
    262     int rc = RTPathAppPrivateArch(szPath, sizeof(szPath) - 1 - cchExt - cchFilename);
     262    int rc = RTPathAppPrivateArch(szPath, sizeof(szPath) - 1 - cchSuffix - cchFilename);
    263263    AssertRCReturn(rc, rc);
    264264
     
    267267    memcpy(psz, pszFilename, cchFilename);
    268268    psz += cchFilename;
    269     memcpy(psz, pszExt, cchExt + 1);
     269    memcpy(psz, pszSuffix, cchSuffix + 1);
    270270
    271271    if (!RTPathExists(szPath))
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