- Timestamp:
- Aug 6, 2015 10:19:55 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101966
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/testcase/vbox-img.cpp
r55974 r57214 272 272 rc = VDCreate(pVDIfs, enmType, &pVD); 273 273 if (RT_FAILURE(rc)) 274 return errorRuntime("Cannot create the virtual disk container: %Rr c\n", rc);274 return errorRuntime("Cannot create the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 275 275 276 276 /* Open in info mode to be able to open diff images without their parent. */ 277 277 rc = VDOpen(pVD, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO, NULL); 278 278 if (RT_FAILURE(rc)) 279 return errorRuntime("Cannot open the virtual disk image \"%s\": %Rr c\n",280 pszFilename, rc );279 return errorRuntime("Cannot open the virtual disk image \"%s\": %Rrf (%Rrc)\n", 280 pszFilename, rc, rc); 281 281 282 282 RTUUID oldImageUuid; … … 301 301 rc = VDSetUuid(pVD, VD_LAST_IMAGE, &imageUuid); 302 302 if (RT_FAILURE(rc)) 303 return errorRuntime("Cannot set UUID of virtual disk image \"%s\": %Rr c\n",304 pszFilename, rc );303 return errorRuntime("Cannot set UUID of virtual disk image \"%s\": %Rrf (%Rrc)\n", 304 pszFilename, rc, rc); 305 305 } 306 306 … … 310 310 rc = VDSetParentUuid(pVD, VD_LAST_IMAGE, &parentUuid); 311 311 if (RT_FAILURE(rc)) 312 return errorRuntime("Cannot set parent UUID of virtual disk image \"%s\": %Rr c\n",313 pszFilename, rc );312 return errorRuntime("Cannot set parent UUID of virtual disk image \"%s\": %Rrf (%Rrc)\n", 313 pszFilename, rc, rc); 314 314 } 315 315 … … 408 408 rc = VDCreate(pVDIfs, enmType, &pVD); 409 409 if (RT_FAILURE(rc)) 410 return errorRuntime("Cannot create the virtual disk container: %Rr c\n", rc);410 return errorRuntime("Cannot create the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 411 411 412 412 /* Open in info mode to be able to open diff images without their parent. */ 413 413 rc = VDOpen(pVD, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO, NULL); 414 414 if (RT_FAILURE(rc)) 415 return errorRuntime("Cannot open the virtual disk image \"%s\": %Rr c\n",416 pszFilename, rc );415 return errorRuntime("Cannot open the virtual disk image \"%s\": %Rrf (%Rrc)\n", 416 pszFilename, rc, rc); 417 417 418 418 VDGEOMETRY oldLCHSGeometry; … … 442 442 rc = VDSetLCHSGeometry(pVD, VD_LAST_IMAGE, &newLCHSGeometry); 443 443 if (RT_FAILURE(rc)) 444 return errorRuntime("Cannot set LCHS geometry of virtual disk image \"%s\": %Rr c\n",445 pszFilename, rc );444 return errorRuntime("Cannot set LCHS geometry of virtual disk image \"%s\": %Rrf (%Rrc)\n", 445 pszFilename, rc, rc); 446 446 } 447 447 else … … 1013 1013 if (RT_FAILURE(rc)) 1014 1014 { 1015 errorRuntime("Error while creating source disk container: %Rr c\n", rc);1015 errorRuntime("Error while creating source disk container: %Rrf (%Rrc)\n", rc, rc); 1016 1016 break; 1017 1017 } … … 1022 1022 if (RT_FAILURE(rc)) 1023 1023 { 1024 errorRuntime("Error while opening source image: %Rr c\n", rc);1024 errorRuntime("Error while opening source image: %Rrf (%Rrc)\n", rc, rc); 1025 1025 break; 1026 1026 } … … 1029 1029 if (RT_FAILURE(rc)) 1030 1030 { 1031 errorRuntime("Error while creating the destination disk container: %Rr c\n", rc);1031 errorRuntime("Error while creating the destination disk container: %Rrf (%Rrc)\n", rc, rc); 1032 1032 break; 1033 1033 } … … 1043 1043 if (RT_FAILURE(rc)) 1044 1044 { 1045 errorRuntime("Error while copying the image: %Rr c\n", rc);1045 errorRuntime("Error while copying the image: %Rrf (%Rrc)\n", rc, rc); 1046 1046 break; 1047 1047 } … … 1102 1102 rc = VDCreate(pVDIfs, enmType, &pDisk); 1103 1103 if (RT_FAILURE(rc)) 1104 return errorRuntime("Error while creating the virtual disk container: %Rr c\n", rc);1104 return errorRuntime("Error while creating the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 1105 1105 1106 1106 /* Open the image */ 1107 1107 rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO | VD_OPEN_FLAGS_READONLY, NULL); 1108 1108 if (RT_FAILURE(rc)) 1109 return errorRuntime("Error while opening the image: %Rr c\n", rc);1109 return errorRuntime("Error while opening the image: %Rrf (%Rrc)\n", rc, rc); 1110 1110 1111 1111 VDDumpImages(pDisk); … … 1261 1261 rc = VDCreate(pVDIfs, enmType, &pDisk); 1262 1262 if (RT_FAILURE(rc)) 1263 return errorRuntime("Error while creating the virtual disk container: %Rr c\n", rc);1263 return errorRuntime("Error while creating the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 1264 1264 1265 1265 /* Open the image */ 1266 1266 rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_NORMAL, NULL); 1267 1267 if (RT_FAILURE(rc)) 1268 return errorRuntime("Error while opening the image: %Rr c\n", rc);1268 return errorRuntime("Error while opening the image: %Rrf (%Rrc)\n", rc, rc); 1269 1269 1270 1270 if ( RT_SUCCESS(rc) … … 1352 1352 } 1353 1353 else 1354 errorRuntime("Error while opening the volume manager: %Rr c\n", rc);1354 errorRuntime("Error while opening the volume manager: %Rrf (%Rrc)\n", rc, rc); 1355 1355 } 1356 1356 else 1357 errorRuntime("Error creating the volume manager: %Rr c\n", rc);1357 errorRuntime("Error creating the volume manager: %Rrf (%Rrc)\n", rc, rc); 1358 1358 } 1359 1359 else … … 1368 1368 rc = VDCompact(pDisk, 0, pIfsCompact); 1369 1369 if (RT_FAILURE(rc)) 1370 errorRuntime("Error while compacting image: %Rr c\n", rc);1370 errorRuntime("Error while compacting image: %Rrf (%Rrc)\n", rc, rc); 1371 1371 } 1372 1372 … … 1435 1435 rc = VDCreate(pVDIfs, VDTYPE_HDD, &pDisk); 1436 1436 if (RT_FAILURE(rc)) 1437 return errorRuntime("Error while creating the virtual disk container: %Rr c\n", rc);1437 return errorRuntime("Error while creating the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 1438 1438 1439 1439 rc = VDCreateCache(pDisk, "VCI", pszFilename, cbSize, VD_IMAGE_FLAGS_DEFAULT, 1440 1440 NULL, NULL, VD_OPEN_FLAGS_NORMAL, NULL, NULL); 1441 1441 if (RT_FAILURE(rc)) 1442 return errorRuntime("Error while creating the virtual disk cache: %Rr c\n", rc);1442 return errorRuntime("Error while creating the virtual disk cache: %Rrf (%Rrc)\n", rc, rc); 1443 1443 1444 1444 VDDestroy(pDisk); … … 1572 1572 rc = VDCreate(pVDIfs, VDTYPE_HDD, &pDisk); 1573 1573 if (RT_FAILURE(rc)) 1574 return errorRuntime("Error while creating the virtual disk container: %Rr c\n", rc);1574 return errorRuntime("Error while creating the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 1575 1575 1576 1576 rc = VDCreateBase(pDisk, pszBackend, pszFilename, cbSize, uImageFlags, … … 1578 1578 NULL, pVDIfsOperation); 1579 1579 if (RT_FAILURE(rc)) 1580 return errorRuntime("Error while creating the virtual disk: %Rr c\n", rc);1580 return errorRuntime("Error while creating the virtual disk: %Rrf (%Rrc)\n", rc, rc); 1581 1581 1582 1582 VDDestroy(pDisk); … … 1645 1645 rc = VDRepair(pVDIfs, NULL, pszFilename, pszFormat, fDryRun ? VD_REPAIR_DRY_RUN : 0); 1646 1646 if (RT_FAILURE(rc)) 1647 rc = errorRuntime("Error while repairing the virtual disk: %Rr c\n", rc);1647 rc = errorRuntime("Error while repairing the virtual disk: %Rrf (%Rrc)\n", rc, rc); 1648 1648 1649 1649 if (pszBackend) … … 1697 1697 rc = VDCreate(pVDIfs, enmType, &pDisk); 1698 1698 if (RT_FAILURE(rc)) 1699 return errorRuntime("Error while creating the virtual disk container: %Rr c\n", rc);1699 return errorRuntime("Error while creating the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 1700 1700 1701 1701 /* Open the image */ 1702 1702 rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO, NULL); 1703 1703 if (RT_FAILURE(rc)) 1704 return errorRuntime("Error while opening the image: %Rr c\n", rc);1704 return errorRuntime("Error while opening the image: %Rrf (%Rrc)\n", rc, rc); 1705 1705 1706 1706 VDSetComment(pDisk, 0, NULL); … … 1768 1768 rc = VDCreate(pVDIfs, enmType, &pDisk); 1769 1769 if (RT_FAILURE(rc)) 1770 return errorRuntime("Error while creating the virtual disk container: %Rr c\n", rc);1770 return errorRuntime("Error while creating the virtual disk container: %Rrf (%Rrc)\n", rc, rc); 1771 1771 1772 1772 /* Open the image */ 1773 1773 rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_NORMAL, NULL); 1774 1774 if (RT_FAILURE(rc)) 1775 return errorRuntime("Error while opening the image: %Rr c\n", rc);1775 return errorRuntime("Error while opening the image: %Rrf (%Rrc)\n", rc, rc); 1776 1776 1777 1777 rc = VDResize(pDisk, cbNew, &PCHSGeometry, &LCHSGeometry, NULL); 1778 1778 if (RT_FAILURE(rc)) 1779 rc = errorRuntime("Error while resizing the virtual disk: %Rr c\n", rc);1779 rc = errorRuntime("Error while resizing the virtual disk: %Rrf (%Rrc)\n", rc, rc); 1780 1780 1781 1781 VDDestroy(pDisk);
Note:
See TracChangeset
for help on using the changeset viewer.