- Timestamp:
- Oct 26, 2010 12:27:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/isofs.cpp
r33453 r33463 30 30 *******************************************************************************/ 31 31 #include <iprt/isofs.h> 32 33 #include <iprt/file.h> 34 #include <iprt/err.h> 35 #include <iprt/mem.h> 32 36 #include <iprt/path.h> 33 34 35 /** 36 * Destroys the patch cache. 37 #include <iprt/string.h> 38 39 40 /** 41 * Destroys the path cache. 37 42 * 38 43 * @param pFile ISO handle. 39 44 */ 40 RTR3DECL(void)rtIsoFsDestroyPathCache(PRTISOFSFILE pFile)45 static void rtIsoFsDestroyPathCache(PRTISOFSFILE pFile) 41 46 { 42 47 PRTISOFSPATHTABLEENTRY pNode = RTListNodeGetFirst(&pFile->listPaths, RTISOFSPATHTABLEENTRY, Node); … … 69 74 * @param pHeader Path header information to add. 70 75 */ 71 RTR3DECL(int)rtIsoFsAddToPathCache(PRTLISTNODE pList, const char *pszPath,72 76 static int rtIsoFsAddToPathCache(PRTLISTNODE pList, const char *pszPath, 77 RTISOFSPATHTABLEHEADER *pHeader) 73 78 { 74 79 AssertPtrReturn(pList, VERR_INVALID_PARAMETER); … … 106 111 * @param ppszPath Pointer to a pointer to store the retrieved full path to. 107 112 */ 108 RTR3DECL(int)rtIsoFsGetParentPathSub(PRTLISTNODE pList, PRTISOFSPATHTABLEENTRY pNode,109 113 static int rtIsoFsGetParentPathSub(PRTLISTNODE pList, PRTISOFSPATHTABLEENTRY pNode, 114 char *pszPathNode, char **ppszPath) 110 115 { 111 116 int rc = VINF_SUCCESS; … … 119 124 pNodeParent = RTListNodeGetNext(&pNodeParent->Node, RTISOFSPATHTABLEENTRY, Node); 120 125 /* Construct intermediate path (parent + current path). */ 121 char *pszPath ;122 if ( RTStrAPrintf(&pszPath, "%s/%s", pNodeParent->path, pszPathNode))126 char *pszPath = RTPathJoinA(pNodeParent->path, pszPathNode); 127 if (pszPath) 123 128 { 124 129 /* ... and do the same with the parent's parent until we reached the root. */ … … 127 132 } 128 133 else 129 rc = VERR_NO_ MEMORY;134 rc = VERR_NO_STR_MEMORY; 130 135 } 131 136 else /* No parent (left), this must be the root path then. */ 132 { 133 char *pszPath = RTStrDup(pszPathNode); 134 *ppszPath = pszPath; 135 } 137 *ppszPath = RTStrDup(pszPathNode); 136 138 return rc; 137 139 } … … 144 146 * @param pFile ISO handle. 145 147 */ 146 RTR3DECL(int)rtIsoFsUpdatePathCache(PRTISOFSFILE pFile)148 static int rtIsoFsUpdatePathCache(PRTISOFSFILE pFile) 147 149 { 148 150 AssertPtrReturn(pFile, VERR_INVALID_PARAMETER); … … 302 304 * rtIsoFsFreeDirectoryRecord(). 303 305 */ 304 RTR3DECL(int)rtIsoFsFindEntry(PRTISOFSFILE pFile, const char *pszFileName,305 306 306 static int rtIsoFsFindEntry(PRTISOFSFILE pFile, const char *pszFileName, 307 uint32_t uExtentSector, uint32_t cbExtent /* Bytes */, 308 PRTISOFSDIRRECORD *ppRec) 307 309 { 308 310 AssertPtrReturn(pFile, VERR_INVALID_PARAMETER); … … 398 400 * @param puSector Pointer where to store the found sector to. 399 401 */ 400 RTR3DECL(int)rtIsoFsResolvePath(PRTISOFSFILE pFile, const char *pszPath, uint32_t *puSector)402 static int rtIsoFsResolvePath(PRTISOFSFILE pFile, const char *pszPath, uint32_t *puSector) 401 403 { 402 404 AssertPtrReturn(pFile, VERR_INVALID_PARAMETER); … … 447 449 * @return Pointer to the newly allocated directory record. 448 450 */ 449 RTR3DECL(PRTISOFSDIRRECORD)rtIsoFsCreateDirectoryRecord(void)451 static PRTISOFSDIRRECORD rtIsoFsCreateDirectoryRecord(void) 450 452 { 451 453 PRTISOFSDIRRECORD pRecord = (PRTISOFSDIRRECORD)RTMemAlloc(sizeof(RTISOFSDIRRECORD)); … … 459 461 * @return IPRT status code. 460 462 */ 461 RTR3DECL(void)rtIsoFsFreeDirectoryRecord(PRTISOFSDIRRECORD pRecord)463 static void rtIsoFsFreeDirectoryRecord(PRTISOFSDIRRECORD pRecord) 462 464 { 463 465 RTMemFree(pRecord); … … 475 477 * rtIsoFsFreeDirectoryRecord(). 476 478 */ 477 RTR3DECL(int)rtIsoFsGetDirectoryRecord(PRTISOFSFILE pFile, const char *pszPath,478 479 static int rtIsoFsGetDirectoryRecord(PRTISOFSFILE pFile, const char *pszPath, 480 PRTISOFSDIRRECORD *ppRecord) 479 481 { 480 482 AssertPtrReturn(pFile, VERR_INVALID_PARAMETER);
Note:
See TracChangeset
for help on using the changeset viewer.