vbox的更動 35183 路徑 trunk/src/VBox/Runtime/r3
- 時間撮記:
- 2010-12-16 下午01:59:44 (14 年 以前)
- 位置:
- trunk/src/VBox/Runtime/r3
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/posix/ldrNative-posix.cpp
r35152 r35183 41 41 42 42 43 int rtldrNativeLoad(const char *pszFilename, uintptr_t *phHandle, uint32_t fFlags, char *pszError, size_t cbError)43 int rtldrNativeLoad(const char *pszFilename, uintptr_t *phHandle, uint32_t fFlags, PRTERRINFO pErrInfo) 44 44 { 45 45 /* … … 60 60 char *psz = (char *)alloca(cch + sizeof(s_szSuff)); 61 61 if (!psz) 62 return VERR_NO_MEMORY;62 return RTErrInfoSet(pErrInfo, VERR_NO_MEMORY, "alloca failed"); 63 63 memcpy(psz, pszFilename, cch); 64 64 memcpy(psz + cch, s_szSuff, sizeof(s_szSuff)); … … 82 82 83 83 const char *pszDlError = dlerror(); 84 if (pszError) 85 RTStrCopy(pszError, cbError, pszDlError); 84 RTErrInfoSet(pErrInfo, VERR_FILE_NOT_FOUND, pszDlError); 86 85 LogRel(("rtldrNativeLoad: dlopen('%s', RTLD_NOW | RTLD_LOCAL) failed: %s\n", pszFilename, pszDlError)); 87 86 return VERR_FILE_NOT_FOUND; -
trunk/src/VBox/Runtime/r3/win/ldrNative-win.cpp
r35152 r35183 40 40 41 41 42 int rtldrNativeLoad(const char *pszFilename, uintptr_t *phHandle, uint32_t fFlags, char *pszError, size_t cbError)42 int rtldrNativeLoad(const char *pszFilename, uintptr_t *phHandle, uint32_t fFlags, PRTERRINFO pErrInfo) 43 43 { 44 44 Assert(sizeof(*phHandle) >= sizeof(HMODULE)); … … 53 53 char *psz = (char *)alloca(cch + sizeof(".DLL")); 54 54 if (!psz) 55 return VERR_NO_MEMORY;55 return RTErrInfoSet(pErrInfo, VERR_NO_MEMORY, "alloca failed"); 56 56 memcpy(psz, pszFilename, cch); 57 57 memcpy(psz + cch, ".DLL", sizeof(".DLL")); … … 74 74 DWORD dwErr = GetLastError(); 75 75 int rc = RTErrConvertFromWin32(dwErr); 76 if (cbError) 77 RTStrPrintf(pszError, cbError, "GetLastError=%u", dwErr); 78 return rc; 76 return RTErrInfoSetF(pErrInfo, rc, "GetLastError=%u", dwErr); 79 77 } 80 78
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器