Changeset 13835 in vbox for trunk/src/VBox/HostServices/SharedFolders
- Timestamp:
- Nov 5, 2008 2:34:43 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 38826
- Location:
- trunk/src/VBox/HostServices/SharedFolders
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/mappings.cpp
r8155 r13835 86 86 AssertRC(rc); 87 87 88 if ( VBOX_SUCCESS(rc))88 if (RT_SUCCESS(rc)) 89 89 { 90 90 rc = RTStrUtf8ToCurrentCP(&asciiroot, utf8Root); 91 if ( VBOX_SUCCESS(rc))91 if (RT_SUCCESS(rc)) 92 92 { 93 93 rc = RTFsQueryProperties(asciiroot, &prop); … … 97 97 RTStrFree(utf8Root); 98 98 } 99 FolderMapping[i].fHostCaseSensitive = VBOX_SUCCESS(rc) ? prop.fCaseSensitive : false;99 FolderMapping[i].fHostCaseSensitive = RT_SUCCESS(rc) ? prop.fCaseSensitive : false; 100 100 break; 101 101 } … … 303 303 304 304 rc = RTStrToUtf16 ((const char *) pszMapName->String.utf8, &utf16Name); 305 if ( VBOX_FAILURE (rc))305 if (RT_FAILURE (rc)) 306 306 return rc; 307 307 -
trunk/src/VBox/HostServices/SharedFolders/service.cpp
r10529 r13835 341 341 rc = vbsfMappingsQuery (pClient, pMappings, &cMappings); 342 342 343 if ( VBOX_SUCCESS(rc))343 if (RT_SUCCESS(rc)) 344 344 { 345 345 /* Update parameters.*/ … … 386 386 rc = vbsfMappingsQueryName (pClient, root, pString); 387 387 388 if ( VBOX_SUCCESS(rc))388 if (RT_SUCCESS(rc)) 389 389 { 390 390 /* Update parameters.*/ … … 437 437 rc = vbsfCreate (pClient, root, pPath, cbPath, pParms); 438 438 439 if ( VBOX_SUCCESS(rc))439 if (RT_SUCCESS(rc)) 440 440 { 441 441 /* Update parameters.*/ … … 485 485 rc = vbsfClose (pClient, root, Handle); 486 486 487 if ( VBOX_SUCCESS(rc))487 if (RT_SUCCESS(rc)) 488 488 { 489 489 /* Update parameters.*/ … … 548 548 pStatusLed->Actual.s.fReading = 0; 549 549 550 if ( VBOX_SUCCESS(rc))550 if (RT_SUCCESS(rc)) 551 551 { 552 552 /* Update parameters.*/ … … 613 613 pStatusLed->Actual.s.fWriting = 0; 614 614 615 if ( VBOX_SUCCESS(rc))615 if (RT_SUCCESS(rc)) 616 616 { 617 617 /* Update parameters.*/ … … 689 689 rc = vbsfLock(pClient, root, Handle, offset, length, flags); 690 690 691 if ( VBOX_SUCCESS(rc))691 if (RT_SUCCESS(rc)) 692 692 { 693 693 /* Update parameters.*/ … … 756 756 rc = VINF_SUCCESS; /* Successfully return these files. */ 757 757 758 if ( VBOX_SUCCESS(rc))758 if (RT_SUCCESS(rc)) 759 759 { 760 760 /* Update parameters.*/ … … 801 801 rc = vbsfMapFolder (pClient, pszMapName, delimiter, false, &root); 802 802 803 if ( VBOX_SUCCESS(rc))803 if (RT_SUCCESS(rc)) 804 804 { 805 805 /* Update parameters.*/ … … 844 844 rc = vbsfMapFolder (pClient, pszMapName, delimiter, fCaseSensitive, &root); 845 845 846 if ( VBOX_SUCCESS(rc))846 if (RT_SUCCESS(rc)) 847 847 { 848 848 /* Update parameters.*/ … … 880 880 rc = vbsfUnmapFolder (pClient, root); 881 881 882 if ( VBOX_SUCCESS(rc))882 if (RT_SUCCESS(rc)) 883 883 { 884 884 /* Update parameters.*/ … … 925 925 rc = vbsfQueryFSInfo (pClient, root, Handle, flags, &length, pBuffer); 926 926 927 if ( VBOX_SUCCESS(rc))927 if (RT_SUCCESS(rc)) 928 928 { 929 929 /* Update parameters.*/ … … 974 974 975 975 rc = vbsfRemove (pClient, root, pPath, cbPath, flags); 976 if ( VBOX_SUCCESS(rc))976 if (RT_SUCCESS(rc)) 977 977 { 978 978 /* Update parameters.*/ … … 1022 1022 /* Execute the function. */ 1023 1023 rc = vbsfRename (pClient, root, pSrc, pDest, flags); 1024 if ( VBOX_SUCCESS(rc))1024 if (RT_SUCCESS(rc)) 1025 1025 { 1026 1026 /* Update parameters.*/ … … 1071 1071 rc = vbsfFlush (pClient, root, Handle); 1072 1072 1073 if ( VBOX_SUCCESS(rc))1073 if (RT_SUCCESS(rc)) 1074 1074 { 1075 1075 /* Nothing to do */ … … 1096 1096 1097 1097 if ( !fAsynchronousProcessing 1098 || VBOX_FAILURE (rc))1098 || RT_FAILURE (rc)) 1099 1099 { 1100 /* Complete the operation if it was unsuccessful or 1100 /* Complete the operation if it was unsuccessful or 1101 1101 * it was processed synchronously. 1102 1102 */ … … 1172 1172 rc = vbsfMappingsAdd (pFolderName, pMapName, fWritable); 1173 1173 1174 if ( VBOX_SUCCESS(rc))1174 if (RT_SUCCESS(rc)) 1175 1175 { 1176 1176 /* Update parameters.*/ … … 1217 1217 rc = vbsfMappingsRemove (pString); 1218 1218 1219 if ( VBOX_SUCCESS(rc))1219 if (RT_SUCCESS(rc)) 1220 1220 { 1221 1221 /* Update parameters.*/ -
trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp
r8155 r13835 52 52 static int iDirFile = 0; 53 53 54 static const char *pszDirList[] = 54 static const char *pszDirList[] = 55 55 { 56 56 "c:", … … 59 59 }; 60 60 61 static const char *pszDirListC[] = 61 static const char *pszDirListC[] = 62 62 { 63 63 ".", … … 66 66 }; 67 67 68 static const char *pszDirListTestdir[] = 68 static const char *pszDirListTestdir[] = 69 69 { 70 70 ".", … … 85 85 }; 86 86 87 static const char *pszDirListSUBDIR[] = 87 static const char *pszDirListSUBDIR[] = 88 88 { 89 89 ".", … … 163 163 return VINF_SUCCESS; 164 164 } 165 165 166 166 switch(iDirList) 167 167 { … … 221 221 rc = RTDirOpenFiltered (&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT); 222 222 *(pszStartComponent-1) = RTPATH_DELIMITER; 223 if ( VBOX_FAILURE(rc))223 if (RT_FAILURE(rc)) 224 224 goto end; 225 225 … … 251 251 } 252 252 } 253 if ( VBOX_FAILURE(rc))253 if (RT_FAILURE(rc)) 254 254 Log(("vbsfCorrectCasing %s failed with %d\n", pszStartComponent, rc)); 255 255 … … 313 313 uint32_t len = strlen(pszFullPath); 314 314 char *src = pszFullPath + len - 1; 315 315 316 316 Log(("Handle case insenstive guest fs on top of host case sensitive fs for %s\n", pszFullPath)); 317 317 … … 337 337 src--; 338 338 } 339 Assert(*src == RTPATH_DELIMITER && VBOX_SUCCESS(rc));340 if ( *src == RTPATH_DELIMITER 341 && VBOX_SUCCESS(rc))339 Assert(*src == RTPATH_DELIMITER && RT_SUCCESS(rc)); 340 if ( *src == RTPATH_DELIMITER 341 && RT_SUCCESS(rc)) 342 342 { 343 343 src++; … … 366 366 else 367 367 rc = VERR_FILE_NOT_FOUND; 368 368 369 369 if (rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND) 370 370 { 371 371 /* path component is invalid; try to correct the casing */ 372 372 rc = vbsfCorrectCasing(pszFullPath, src); 373 if ( VBOX_FAILURE(rc))373 if (RT_FAILURE(rc)) 374 374 { 375 375 if (!fEndOfString) … … 385 385 src = end + 1; 386 386 } 387 if ( VBOX_FAILURE(rc))387 if (RT_FAILURE(rc)) 388 388 Log(("Unable to find suitable component rc=%d\n", rc)); 389 389 } … … 395 395 *pszWildCardComponent = RTPATH_DELIMITER; 396 396 397 if ( VBOX_SUCCESS(rc))397 if (RT_SUCCESS(rc)) 398 398 Log(("New valid path %s\n", pszFullPath)); 399 399 else -
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r9927 r13835 130 130 rc = RTDirOpenFiltered (&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT); 131 131 *(pszStartComponent-1) = RTPATH_DELIMITER; 132 if ( VBOX_FAILURE(rc))132 if (RT_FAILURE(rc)) 133 133 goto end; 134 134 … … 162 162 163 163 end: 164 if ( VBOX_FAILURE(rc))164 if (RT_FAILURE(rc)) 165 165 Log(("vbsfCorrectCasing %s failed with %d\n", pszStartComponent, rc)); 166 166 … … 196 196 197 197 rc = RTUtf16ToUtf8 (pwszRoot, &utf8Root); 198 if ( VBOX_SUCCESS (rc))198 if (RT_SUCCESS (rc)) 199 199 { 200 200 size_t cbUtf8Root, cbUtf8FullPath; … … 289 289 290 290 rc = RTUtf16ToUtf8Ex (pwszRoot, RTSTR_MAX, &pszFullPath, cb, NULL); 291 if ( VBOX_FAILURE(rc))291 if (RT_FAILURE(rc)) 292 292 { 293 293 AssertFailed(); … … 336 336 337 337 rc = RTUtf16ToUtf8Ex (src, RTSTR_MAX, &dst, cb, NULL); 338 if ( VBOX_FAILURE(rc))338 if (RT_FAILURE(rc)) 339 339 { 340 340 AssertFailed(); … … 363 363 } 364 364 365 if ( VBOX_SUCCESS (rc))365 if (RT_SUCCESS (rc)) 366 366 { 367 367 /* When the host file system is case sensitive and the guest expects a case insensitive fs, then problems can occur */ … … 438 438 src--; 439 439 } 440 Assert(*src == RTPATH_DELIMITER && VBOX_SUCCESS(rc));440 Assert(*src == RTPATH_DELIMITER && RT_SUCCESS(rc)); 441 441 if ( *src == RTPATH_DELIMITER 442 && VBOX_SUCCESS(rc))442 && RT_SUCCESS(rc)) 443 443 { 444 444 src++; … … 472 472 /* path component is invalid; try to correct the casing */ 473 473 rc = vbsfCorrectCasing(pszFullPath, src); 474 if ( VBOX_FAILURE(rc))474 if (RT_FAILURE(rc)) 475 475 { 476 476 if (!fEndOfString) … … 486 486 src = end + 1; 487 487 } 488 if ( VBOX_FAILURE(rc))488 if (RT_FAILURE(rc)) 489 489 Log(("Unable to find suitable component rc=%d\n", rc)); 490 490 } … … 1045 1045 rc = vbsfBuildFullPath (pClient, root, pPath, cbPath, &pszFullPath, &cbFullPathRoot); 1046 1046 1047 if ( VBOX_SUCCESS (rc))1047 if (RT_SUCCESS (rc)) 1048 1048 { 1049 1049 /* Reset return values in case client forgot to do so. */ … … 1299 1299 rc = vbsfBuildFullPath (pClient, root, pPath, pPath->u16Size, &pszFullPath, NULL, true); 1300 1300 1301 if ( VBOX_SUCCESS (rc))1301 if (RT_SUCCESS (rc)) 1302 1302 { 1303 1303 rc = RTDirOpenFiltered (&pHandle->dir.SearchHandle, pszFullPath, RTDIRFILTER_WINNT); … … 1306 1306 vbsfFreeFullPath(pszFullPath); 1307 1307 1308 if ( VBOX_FAILURE (rc))1308 if (RT_FAILURE (rc)) 1309 1309 goto end; 1310 1310 } … … 1628 1628 rc = vbsfBuildFullPath (pClient, root, &dummy, 0, &pszFullPath, NULL); 1629 1629 1630 if ( VBOX_SUCCESS (rc))1630 if (RT_SUCCESS (rc)) 1631 1631 { 1632 1632 rc = RTFsQuerySizes(pszFullPath, &pSFDEntry->ullTotalAllocationBytes, &pSFDEntry->ullAvailableAllocationBytes, &pSFDEntry->ulBytesPerAllocationUnit, &pSFDEntry->ulBytesPerSector); … … 1803 1803 1804 1804 rc = vbsfBuildFullPath (pClient, root, pPath, cbPath, &pszFullPath, NULL); 1805 if ( VBOX_SUCCESS (rc))1805 if (RT_SUCCESS (rc)) 1806 1806 { 1807 1807 /* is the guest allowed to write to this share? */ … … 1811 1811 rc = VERR_WRITE_PROTECT; 1812 1812 1813 if ( VBOX_SUCCESS (rc))1813 if (RT_SUCCESS (rc)) 1814 1814 { 1815 1815 if (flags & SHFL_REMOVE_FILE) … … 1854 1854 1855 1855 rc = vbsfBuildFullPath (pClient, root, pDest, pDest->u16Size, &pszFullPathDest, NULL); 1856 if ( VBOX_SUCCESS (rc))1856 if (RT_SUCCESS (rc)) 1857 1857 { 1858 1858 Log(("Rename %s to %s\n", pszFullPathSrc, pszFullPathDest)); … … 1864 1864 rc = VERR_WRITE_PROTECT; 1865 1865 1866 if ( VBOX_SUCCESS (rc))1866 if (RT_SUCCESS (rc)) 1867 1867 { 1868 1868 if (flags & SHFL_RENAME_FILE)
Note:
See TracChangeset
for help on using the changeset viewer.