Changeset 49040 in vbox for trunk/src/VBox/Runtime/common/ldr
- Timestamp:
- Oct 10, 2013 6:36:15 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ldr/ldrNative.cpp
r48935 r49040 183 183 *phLdrMod = NIL_RTLDRMOD; 184 184 AssertPtrReturn(pszFilename, VERR_INVALID_PARAMETER); 185 AssertMsgReturn(!RTPathHa vePath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER);185 AssertMsgReturn(!RTPathHasPath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER); 186 186 187 187 /* … … 191 191 AssertMsgReturn(cchFilename < (RTPATH_MAX / 4) * 3, ("%zu\n", cchFilename), VERR_INVALID_PARAMETER); 192 192 193 const char *psz Ext= "";194 if (!RTPathHa veExt(pszFilename))195 psz Ext= RTLdrGetSuff();193 const char *pszSuffix = ""; 194 if (!RTPathHasSuffix(pszFilename)) 195 pszSuffix = RTLdrGetSuff(); 196 196 197 197 /* 198 198 * Let the platform specific code do the rest. 199 199 */ 200 int rc = rtldrNativeLoadSystem(pszFilename, psz Ext, fNoUnload ? RTLDRLOAD_FLAGS_NO_UNLOAD : 0, phLdrMod);200 int rc = rtldrNativeLoadSystem(pszFilename, pszSuffix, fNoUnload ? RTLDRLOAD_FLAGS_NO_UNLOAD : 0, phLdrMod); 201 201 LogFlow(("RTLdrLoadSystem: returns %Rrc\n", rc)); 202 202 return rc; … … 240 240 *phLdrMod = NIL_RTLDRMOD; 241 241 AssertPtrReturn(pszFilename, VERR_INVALID_PARAMETER); 242 AssertMsgReturn(!RTPathHa vePath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER);242 AssertMsgReturn(!RTPathHasPath(pszFilename), ("%s\n", pszFilename), VERR_INVALID_PARAMETER); 243 243 244 244 /* … … 248 248 AssertMsgReturn(cchFilename < (RTPATH_MAX / 4) * 3, ("%zu\n", cchFilename), VERR_INVALID_PARAMETER); 249 249 250 const char *psz Ext= "";251 size_t cch Ext= 0;252 if (!RTPathHa veExt(pszFilename))250 const char *pszSuffix = ""; 251 size_t cchSuffix = 0; 252 if (!RTPathHasSuffix(pszFilename)) 253 253 { 254 psz Ext= RTLdrGetSuff();255 cch Ext = strlen(pszExt);254 pszSuffix = RTLdrGetSuff(); 255 cchSuffix = strlen(pszSuffix); 256 256 } 257 257 … … 260 260 */ 261 261 char szPath[RTPATH_MAX]; 262 int rc = RTPathAppPrivateArch(szPath, sizeof(szPath) - 1 - cch Ext- cchFilename);262 int rc = RTPathAppPrivateArch(szPath, sizeof(szPath) - 1 - cchSuffix - cchFilename); 263 263 AssertRCReturn(rc, rc); 264 264 … … 267 267 memcpy(psz, pszFilename, cchFilename); 268 268 psz += cchFilename; 269 memcpy(psz, psz Ext, cchExt+ 1);269 memcpy(psz, pszSuffix, cchSuffix + 1); 270 270 271 271 if (!RTPathExists(szPath))
Note:
See TracChangeset
for help on using the changeset viewer.