Changeset 32536 in vbox for trunk/src/VBox/Devices/Storage/testcase
- Timestamp:
- Sep 15, 2010 6:25:32 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 65918
- Location:
- trunk/src/VBox/Devices/Storage/testcase
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/testcase/Makefile.kmk
r32432 r32536 96 96 $(VBOX_PATH_DEVICES_SRC)/Storage/ParallelsHDDCore.cpp \ 97 97 $(VBOX_PATH_DEVICES_SRC)/Storage/DMGHDDCore.cpp 98 ifdef VBOX_WITH_NEW_IO_CODE99 vbox-img_DEFS += VBOX_WITH_NEW_IO_CODE100 endif101 98 vbox-img_DEFS += VBOX_HDD_NO_DYNAMIC_BACKENDS IN_VBOXDDU IN_VBOXDDU_STATIC IN_RT_R3 102 99 endif -
trunk/src/VBox/Devices/Storage/testcase/tstVD.cpp
r29250 r32536 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 53 53 } 54 54 55 static int tstVDMessage(void *pvUser, const char *pszFormat, ...) 56 { 57 va_list va; 58 55 static int tstVDMessage(void *pvUser, const char *pszFormat, va_list va) 56 { 59 57 RTPrintf("tstVD: "); 60 va_start(va, pszFormat);61 58 RTPrintfV(pszFormat, va); 62 va_end(va);63 59 return VINF_SUCCESS; 64 60 } … … 69 65 int rc; 70 66 PVBOXHDD pVD = NULL; 71 PDMMEDIAGEOMETRYPCHS = { 0, 0, 0 };72 PDMMEDIAGEOMETRYLCHS = { 0, 0, 0 };67 VDGEOMETRY PCHS = { 0, 0, 0 }; 68 VDGEOMETRY LCHS = { 0, 0, 0 }; 73 69 PVDINTERFACE pVDIfs = NULL; 74 70 VDINTERFACE VDIError; … … 127 123 int rc; 128 124 PVBOXHDD pVD = NULL; 129 PDMMEDIAGEOMETRYPCHS = { 0, 0, 0 };130 PDMMEDIAGEOMETRYLCHS = { 0, 0, 0 };125 VDGEOMETRY PCHS = { 0, 0, 0 }; 126 VDGEOMETRY LCHS = { 0, 0, 0 }; 131 127 PVDINTERFACE pVDIfs = NULL; 132 128 VDINTERFACE VDIError; … … 509 505 PVBOXHDD pVD = NULL; 510 506 char *pszFormat; 511 PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };512 PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };513 uint64_t u64DiskSize 507 VDGEOMETRY PCHS = { 0, 0, 0 }; 508 VDGEOMETRY LCHS = { 0, 0, 0 }; 509 uint64_t u64DiskSize = 1000 * _1M; 514 510 uint32_t u32SectorSize = 512; 515 511 PVDINTERFACE pVDIfs = NULL; … … 551 547 { 552 548 RTFileClose(File); 553 rc = VDGetFormat(NULL, pszBaseFilename, &pszFormat); 549 rc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */, 550 pszBaseFilename, &pszFormat); 554 551 RTPrintf("VDGetFormat() pszFormat=%s rc=%Rrc\n", pszFormat, rc); 555 552 if (RT_SUCCESS(rc) && strcmp(pszFormat, pszBackend)) … … 633 630 int rc; 634 631 PVBOXHDD pVD = NULL; 635 PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };636 PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };637 uint64_t u64DiskSize 632 VDGEOMETRY PCHS = { 0, 0, 0 }; 633 VDGEOMETRY LCHS = { 0, 0, 0 }; 634 uint64_t u64DiskSize = 1000 * _1M; 638 635 uint32_t u32SectorSize = 512; 639 636 PVDINTERFACE pVDIfs = NULL; -
trunk/src/VBox/Devices/Storage/testcase/tstVDCopy.cpp
r31493 r32536 97 97 AssertRC(rc); 98 98 99 rc = VDGetFormat(NULL, argv[1], &pszVD1); 99 rc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */, 100 argv[1], &pszVD1); 100 101 CHECK("VDGetFormat() hdd1"); 101 102 102 rc = VDGetFormat(NULL, argv[2], &pszVD2); 103 rc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */, 104 argv[2], &pszVD2); 103 105 CHECK("VDGetFormat() hdd2"); 104 106 -
trunk/src/VBox/Devices/Storage/testcase/tstVDShareable.cpp
r31193 r32536 53 53 } 54 54 55 static int tstVDMessage(void *pvUser, const char *pszFormat, ...)55 static int tstVDMessage(void *pvUser, const char *pszFormat, va_list va) 56 56 { 57 va_list va;58 59 57 RTPrintf("tstVD: "); 60 va_start(va, pszFormat);61 58 RTPrintfV(pszFormat, va); 62 va_end(va);63 59 return VINF_SUCCESS; 64 60 } … … 69 65 int rc; 70 66 PVBOXHDD pVD = NULL, pVD2 = NULL; 71 PDMMEDIAGEOMETRYPCHS = { 0, 0, 0 };72 PDMMEDIAGEOMETRYLCHS = { 0, 0, 0 };67 VDGEOMETRY PCHS = { 0, 0, 0 }; 68 VDGEOMETRY LCHS = { 0, 0, 0 }; 73 69 PVDINTERFACE pVDIfs = NULL; 74 70 VDINTERFACE VDIError; -
trunk/src/VBox/Devices/Storage/testcase/tstVDSnap.cpp
r28800 r32536 92 92 } 93 93 94 static int tstVDMessage(void *pvUser, const char *pszFormat, ...) 95 { 96 va_list va; 97 94 static int tstVDMessage(void *pvUser, const char *pszFormat, va_list va) 95 { 98 96 RTPrintf("tstVD: "); 99 va_start(va, pszFormat);100 97 RTPrintfV(pszFormat, va); 101 va_end(va);102 98 return VINF_SUCCESS; 103 99 } … … 220 216 int rc; 221 217 PVBOXHDD pVD = NULL; 222 PDMMEDIAGEOMETRYPCHS = { 0, 0, 0 };223 PDMMEDIAGEOMETRYLCHS = { 0, 0, 0 };218 VDGEOMETRY PCHS = { 0, 0, 0 }; 219 VDGEOMETRY LCHS = { 0, 0, 0 }; 224 220 PVDINTERFACE pVDIfs = NULL; 225 221 VDINTERFACE VDIError; -
trunk/src/VBox/Devices/Storage/testcase/vbox-img.cpp
r32431 r32536 72 72 } 73 73 74 static int handleVDMessage(void *pvUser, const char *pszFormat, ...)74 static int handleVDMessage(void *pvUser, const char *pszFormat, va_list va) 75 75 { 76 76 NOREF(pvUser); 77 va_list args; 78 va_start(args, pszFormat); 79 RTPrintfV(pszFormat, args); 80 va_end(args); 77 RTPrintfV(pszFormat, va); 81 78 return VINF_SUCCESS; 82 79 } … … 177 174 /* Don't pass error interface, as that would triggers error messages 178 175 * because some backends fail to open the image. */ 179 rc = VDGetFormat(NULL, pszFilename, &pszFormat);176 rc = VDGetFormat(NULL, NULL, pszFilename, &pszFormat); 180 177 if (RT_FAILURE(rc)) 181 178 return errorRuntime("Format autodetect failed: %Rrc\n", rc); … … 246 243 const char *pszDstFilename = NULL; 247 244 char *pszSrcFormat = NULL; 248 c har *pszDstFormat = NULL;245 const char *pszDstFormat = NULL; 249 246 const char *pszVariant = NULL; 250 247 PVBOXHDD pSrcDisk = NULL; … … 338 335 if (!pszSrcFormat) 339 336 { 340 rc = VDGetFormat(NULL, pszSrcFilename, &pszSrcFormat);337 rc = VDGetFormat(NULL, NULL, pszSrcFilename, &pszSrcFormat); 341 338 if (RT_FAILURE(rc)) 342 339 { … … 431 428 /* just try it */ 432 429 char *pszFormat = NULL; 433 rc = VDGetFormat(NULL, pszFilename, &pszFormat);430 rc = VDGetFormat(NULL, NULL, pszFilename, &pszFormat); 434 431 if (RT_FAILURE(rc)) 435 432 return errorSyntax("Format autodetect failed: %Rrc\n", rc); … … 487 484 /* just try it */ 488 485 char *pszFormat = NULL; 489 rc = VDGetFormat(NULL, pszFilename, &pszFormat);486 rc = VDGetFormat(NULL, NULL, pszFilename, &pszFormat); 490 487 if (RT_FAILURE(rc)) 491 488 return errorSyntax("Format autodetect failed: %Rrc\n", rc); -
trunk/src/VBox/Devices/Storage/testcase/vditool.cpp
r28855 r32536 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 108 108 return PrintDone(rc); 109 109 110 PDMMEDIAGEOMETRY geo = { 0, 0, 0 }; /* auto-detect */110 VDGEOMETRY geo = { 0, 0, 0 }; /* auto-detect */ 111 111 rc = VDCreateBase(hdd, "vdi", pszUtf8Filename, 112 112 (uint64_t)cMBs * _1M, … … 274 274 if (RT_SUCCESS(rc)) 275 275 { 276 PDMMEDIAGEOMETRY LCHSGeometry = {0, 0, 0};276 VDGEOMETRY LCHSGeometry = {0, 0, 0}; 277 277 rc = VDIDiskSetLCHSGeometry(pVdi, &LCHSGeometry); 278 278 }
Note:
See TracChangeset
for help on using the changeset viewer.