Changeset 11353 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Aug 12, 2008 12:55:15 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/RawHDDCore.cpp
r11287 r11353 359 359 const char *pszComment, 360 360 PCPDMMEDIAGEOMETRY pPCHSGeometry, 361 PCPDMMEDIAGEOMETRY pLCHSGeometry, 361 PCPDMMEDIAGEOMETRY pLCHSGeometry, PCRTUUID pUuid, 362 362 unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, 363 363 void *pvUser, unsigned uPercentStart, … … 365 365 void **ppBackendData) 366 366 { 367 LogFlowFunc(("pszFilename=\"%s\" enmType=%d cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p uOpenFlags=%#x pfnProgress=%#p pvUser=%#p uPercentStart=%u uPercentSpan=%u pInterfaces=%#p ppBackendData=%#p", pszFilename, enmType, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, uOpenFlags, pfnProgress, pvUser, uPercentStart, uPercentSpan, pInterfaces, ppBackendData));367 LogFlowFunc(("pszFilename=\"%s\" enmType=%d cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x pfnProgress=%#p pvUser=%#p uPercentStart=%u uPercentSpan=%u pInterfaces=%#p ppBackendData=%#p", pszFilename, enmType, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, pfnProgress, pvUser, uPercentStart, uPercentSpan, pInterfaces, ppBackendData)); 368 368 int rc; 369 369 PRAWIMAGE pImage; -
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r11287 r11353 1255 1255 * @param pPCHSGeometry Pointer to physical disk geometry <= (16383,16,63). Not NULL. 1256 1256 * @param pLCHSGeometry Pointer to logical disk geometry <= (1024,255,63). Not NULL. 1257 * @param pUuid New UUID of the image. If NULL, a new UUID is created. 1257 1258 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 1258 1259 * @param pfnProgress Progress callback. Optional. NULL if not to be used. … … 1265 1266 PCPDMMEDIAGEOMETRY pPCHSGeometry, 1266 1267 PCPDMMEDIAGEOMETRY pLCHSGeometry, 1267 unsigned uOpenFlags, PFNVMPROGRESS pfnProgress,1268 void *pvUser)1268 PCRTUUID pUuid, unsigned uOpenFlags, 1269 PFNVMPROGRESS pfnProgress, void *pvUser) 1269 1270 { 1270 1271 int rc = VINF_SUCCESS; 1271 1272 PVDIMAGE pImage = NULL; 1272 1273 LogFlowFunc(("pDisk=%#p pszBackend=\"%s\" pszFilename=\"%s\" enmType=%#x cbSize=%llu uImageFlags=%#x pszComment=\"%s\" PCHS=%u/%u/%u LCHS=%u/%u/%u uOpenFlags=%#x pfnProgress=%#p pvUser=%#p\n", 1273 RTUUID uuid; 1274 1275 LogFlowFunc(("pDisk=%#p pszBackend=\"%s\" pszFilename=\"%s\" enmType=%#x cbSize=%llu uImageFlags=%#x pszComment=\"%s\" PCHS=%u/%u/%u LCHS=%u/%u/%u Uuid=%RTuuid uOpenFlags=%#x pfnProgress=%#p pvUser=%#p\n", 1274 1276 pDisk, pszBackend, pszFilename, enmType, cbSize, uImageFlags, pszComment, 1275 1277 pPCHSGeometry->cCylinders, pPCHSGeometry->cHeads, 1276 1278 pPCHSGeometry->cSectors, pLCHSGeometry->cCylinders, 1277 pLCHSGeometry->cHeads, pLCHSGeometry->cSectors, uOpenFlags,1278 pfnProgress, pvUser));1279 pLCHSGeometry->cHeads, pLCHSGeometry->cSectors, pUuid, 1280 uOpenFlags, pfnProgress, pvUser)); 1279 1281 do 1280 1282 { … … 1317 1319 pLCHSGeometry->cSectors), 1318 1320 rc = VERR_INVALID_PARAMETER); 1321 /* The UUID may be NULL. */ 1322 AssertMsgBreakStmt(pUuid == NULL || VALID_PTR(pUuid), 1323 ("pUuid=%#p UUID=%RTuuid\n", pUuid, pUuid), 1324 rc = VERR_INVALID_PARAMETER); 1319 1325 AssertMsgBreakStmt((uOpenFlags & ~VD_OPEN_FLAGS_MASK) == 0, 1320 1326 ("uOpenFlags=%#x\n", uOpenFlags), … … 1350 1356 } 1351 1357 1358 /* Create UUID if the caller didn't specify one. */ 1359 if (!pUuid) 1360 { 1361 rc = RTUuidCreate(&uuid); 1362 if (RT_FAILURE(rc)) 1363 { 1364 rc = vdError(pDisk, rc, RT_SRC_POS, 1365 N_("VD: cannot generate UUID for image '%s'"), 1366 pszFilename); 1367 break; 1368 } 1369 pUuid = &uuid; 1370 } 1371 1352 1372 pImage->uOpenFlags = uOpenFlags & VD_OPEN_FLAGS_HONOR_SAME; 1353 1373 rc = pImage->Backend->pfnCreate(pImage->pszFilename, enmType, cbSize, 1354 1374 uImageFlags, pszComment, pPCHSGeometry, 1355 pLCHSGeometry, 1375 pLCHSGeometry, pUuid, 1356 1376 uOpenFlags & ~VD_OPEN_FLAGS_HONOR_SAME, 1357 1377 pfnProgress, pvUser, 0, 99, … … 1457 1477 * @param uImageFlags Flags specifying special image features. 1458 1478 * @param pszComment Pointer to image comment. NULL is ok. 1479 * @param pUuid New UUID of the image. If NULL, a new UUID is created. 1459 1480 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 1460 1481 * @param pfnProgress Progress callback. Optional. NULL if not to be used. … … 1463 1484 VBOXDDU_DECL(int) VDCreateDiff(PVBOXHDD pDisk, const char *pszBackend, 1464 1485 const char *pszFilename, unsigned uImageFlags, 1465 const char *pszComment, unsigned uOpenFlags, 1466 PFNVMPROGRESS pfnProgress, void *pvUser) 1486 const char *pszComment, PCRTUUID pUuid, 1487 unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, 1488 void *pvUser) 1467 1489 { 1468 1490 int rc = VINF_SUCCESS; 1469 1491 PVDIMAGE pImage = NULL; 1470 1471 LogFlowFunc(("pDisk=%#p pszBackend=\"%s\" pszFilename=\"%s\" uImageFlags=%#x pszComment=\"%s\" uOpenFlags=%#x pfnProgress=%#p pvUser=%#p\n", 1472 pDisk, pszBackend, pszFilename, uImageFlags, pszComment, uOpenFlags, 1492 RTUUID uuid; 1493 1494 LogFlowFunc(("pDisk=%#p pszBackend=\"%s\" pszFilename=\"%s\" uImageFlags=%#x pszComment=\"%s\" Uuid=%RTuuid uOpenFlags=%#x pfnProgress=%#p pvUser=%#p\n", 1495 pDisk, pszBackend, pszFilename, uImageFlags, pszComment, pUuid, uOpenFlags, 1473 1496 pfnProgress, pvUser)); 1474 1497 do … … 1487 1510 AssertMsgBreakStmt((uImageFlags & ~VD_IMAGE_FLAGS_MASK) == 0, 1488 1511 ("uImageFlags=%#x\n", uImageFlags), 1512 rc = VERR_INVALID_PARAMETER); 1513 /* The UUID may be NULL. */ 1514 AssertMsgBreakStmt(pUuid == NULL || VALID_PTR(pUuid), 1515 ("pUuid=%#p UUID=%RTuuid\n", pUuid, pUuid), 1489 1516 rc = VERR_INVALID_PARAMETER); 1490 1517 AssertMsgBreakStmt((uOpenFlags & ~VD_OPEN_FLAGS_MASK) == 0, … … 1519 1546 N_("VD: unknown backend name '%s'"), pszBackend); 1520 1547 break; 1548 } 1549 1550 /* Create UUID if the caller didn't specify one. */ 1551 if (!pUuid) 1552 { 1553 rc = RTUuidCreate(&uuid); 1554 if (RT_FAILURE(rc)) 1555 { 1556 rc = vdError(pDisk, rc, RT_SRC_POS, 1557 N_("VD: cannot generate UUID for image '%s'"), 1558 pszFilename); 1559 break; 1560 } 1561 pUuid = &uuid; 1521 1562 } 1522 1563 … … 1526 1567 uImageFlags, pszComment, 1527 1568 &pDisk->PCHSGeometry, 1528 &pDisk->LCHSGeometry, 1569 &pDisk->LCHSGeometry, pUuid, 1529 1570 uOpenFlags & ~VD_OPEN_FLAGS_HONOR_SAME, 1530 1571 pfnProgress, pvUser, 0, 99, … … 1967 2008 { 1968 2009 rc = VDCreateDiff(pDiskTo, pszBackend, pszFilename, uImageFlagsFrom, 1969 "", uOpenFlagsFrom, NULL, NULL);2010 "", NULL, uOpenFlagsFrom, NULL, NULL); 1970 2011 } else { 1971 2012 rc = VDCreateBase(pDiskTo, pszBackend, pszFilename, enmTypeFrom, 1972 2013 cbSize, uImageFlagsFrom, "", 1973 2014 &PCHSGeometryFrom, &LCHSGeometryFrom, 1974 uOpenFlagsFrom, NULL, NULL);2015 NULL, uOpenFlagsFrom, NULL, NULL); 1975 2016 } 1976 2017 if (RT_FAILURE(rc)) -
trunk/src/VBox/Devices/Storage/VBoxHDD-newInternal.h
r10715 r11353 89 89 * @param pPCHSGeometry Physical drive geometry CHS <= (16383,16,255). 90 90 * @param pLCHSGeometry Logical drive geometry CHS <= (1024,255,63). 91 * @param pUuid New UUID of the image. Not NULL. 91 92 * @param uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants. 92 93 * @param pfnProgress Progress callback. Optional. NULL if not to be used. … … 97 98 * @param ppvBackendData Opaque state data for this image. 98 99 */ 99 DECLR3CALLBACKMEMBER(int, pfnCreate, (const char *pszFilename, VDIMAGETYPE enmType, uint64_t cbSize, unsigned uImageFlags, const char *pszComment, PCPDMMEDIAGEOMETRY pPCHSGeometry, PCPDMMEDIAGEOMETRY pLCHSGeometry, unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, void *pvUser, unsigned uPercentStart, unsigned uPercentSpan, PVDINTERFACE pInterfaces, void **ppvBackendData));100 DECLR3CALLBACKMEMBER(int, pfnCreate, (const char *pszFilename, VDIMAGETYPE enmType, uint64_t cbSize, unsigned uImageFlags, const char *pszComment, PCPDMMEDIAGEOMETRY pPCHSGeometry, PCPDMMEDIAGEOMETRY pLCHSGeometry, PCRTUUID pUuid, unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, void *pvUser, unsigned uPercentStart, unsigned uPercentSpan, PVDINTERFACE pInterfaces, void **ppvBackendData)); 100 101 101 102 /** -
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r11287 r11353 316 316 const char *pszComment, 317 317 PCPDMMEDIAGEOMETRY pPCHSGeometry, 318 PCPDMMEDIAGEOMETRY pLCHSGeometry, 318 PCPDMMEDIAGEOMETRY pLCHSGeometry, PCRTUUID pUuid, 319 319 PFNVMPROGRESS pfnProgress, void *pvUser, 320 320 unsigned uPercentStart, unsigned uPercentSpan) … … 415 415 goto out; 416 416 } 417 418 /* Use specified image uuid */ 419 *getImageCreationUUID(&pImage->Header) = *pUuid; 417 420 418 421 /* Generate image last-modify uuid */ … … 800 803 const char *pszComment, 801 804 PCPDMMEDIAGEOMETRY pPCHSGeometry, 802 PCPDMMEDIAGEOMETRY pLCHSGeometry, 805 PCPDMMEDIAGEOMETRY pLCHSGeometry, PCRTUUID pUuid, 803 806 unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, 804 807 void *pvUser, unsigned uPercentStart, … … 806 809 void **ppBackendData) 807 810 { 808 LogFlowFunc(("pszFilename=\"%s\" enmType=%d cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p uOpenFlags=%#x pfnProgress=%#p pvUser=%#p uPercentStart=%u uPercentSpan=%u pInterfaces=%#p ppBackendData=%#p", pszFilename, enmType, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, uOpenFlags, pfnProgress, pvUser, uPercentStart, uPercentSpan, pInterfaces, ppBackendData));811 LogFlowFunc(("pszFilename=\"%s\" enmType=%d cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x pfnProgress=%#p pvUser=%#p uPercentStart=%u uPercentSpan=%u pInterfaces=%#p ppBackendData=%#p", pszFilename, enmType, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, pfnProgress, pvUser, uPercentStart, uPercentSpan, pInterfaces, ppBackendData)); 809 812 int rc; 810 813 PVDIIMAGEDESC pImage; … … 843 846 844 847 rc = vdiCreateImage(pImage, enmType, cbSize, uImageFlags, pszComment, 845 pPCHSGeometry, pLCHSGeometry, 848 pPCHSGeometry, pLCHSGeometry, pUuid, 846 849 pfnProgress, pvUser, uPercentStart, uPercentSpan); 847 850 if (RT_SUCCESS(rc)) -
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r11287 r11353 3096 3096 const char *pszComment, 3097 3097 PCPDMMEDIAGEOMETRY pPCHSGeometry, 3098 PCPDMMEDIAGEOMETRY pLCHSGeometry, 3098 PCPDMMEDIAGEOMETRY pLCHSGeometry, PCRTUUID pUuid, 3099 3099 PFNVMPROGRESS pfnProgress, void *pvUser, 3100 3100 unsigned uPercentStart, unsigned uPercentSpan) … … 3180 3180 pImage->PCHSGeometry = *pPCHSGeometry; 3181 3181 3182 rc = RTUuidCreate(&pImage->ImageUuid); 3183 if (RT_FAILURE(rc)) 3184 goto out; 3182 pImage->ImageUuid = *pUuid; 3185 3183 rc = vmdkDescDDBSetUuid(pImage, &pImage->Descriptor, 3186 3184 VMDK_DDB_IMAGE_UUID, &pImage->ImageUuid); … … 3746 3744 const char *pszComment, 3747 3745 PCPDMMEDIAGEOMETRY pPCHSGeometry, 3748 PCPDMMEDIAGEOMETRY pLCHSGeometry, 3746 PCPDMMEDIAGEOMETRY pLCHSGeometry, PCRTUUID pUuid, 3749 3747 unsigned uOpenFlags, PFNVMPROGRESS pfnProgress, 3750 3748 void *pvUser, unsigned uPercentStart, … … 3752 3750 void **ppBackendData) 3753 3751 { 3754 LogFlowFunc(("pszFilename=\"%s\" enmType=%d cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p uOpenFlags=%#x pfnProgress=%#p pvUser=%#p uPercentStart=%u uPercentSpan=%u pInterfaces=%#p ppBackendData=%#p", pszFilename, enmType, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, uOpenFlags, pfnProgress, pvUser, uPercentStart, uPercentSpan, pInterfaces, ppBackendData));3752 LogFlowFunc(("pszFilename=\"%s\" enmType=%d cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x pfnProgress=%#p pvUser=%#p uPercentStart=%u uPercentSpan=%u pInterfaces=%#p ppBackendData=%#p", pszFilename, enmType, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, pfnProgress, pvUser, uPercentStart, uPercentSpan, pInterfaces, ppBackendData)); 3755 3753 int rc; 3756 3754 PVMDKIMAGE pImage; … … 3807 3805 3808 3806 rc = vmdkCreateImage(pImage, enmType, cbSize, uImageFlags, pszComment, 3809 pPCHSGeometry, pLCHSGeometry, 3807 pPCHSGeometry, pLCHSGeometry, pUuid, 3810 3808 pfnProgress, pvUser, uPercentStart, uPercentSpan); 3811 3809 if (RT_SUCCESS(rc)) -
trunk/src/VBox/Devices/Storage/testcase/tstVD.cpp
r10715 r11353 83 83 84 84 rc = VDCreateBase(pVD, pszBackend, pszFilename, enmType, cbSize, 85 uFlags, "Test image", &PCHS, &LCHS, VD_OPEN_FLAGS_NORMAL,86 NULL, NULL);85 uFlags, "Test image", &PCHS, &LCHS, NULL, 86 VD_OPEN_FLAGS_NORMAL, NULL, NULL); 87 87 CHECK("VDCreateBase()"); 88 88 … … 101 101 102 102 /** 103 * The following code is based on the work of George Marsaglia 104 * taken from 103 * The following code is based on the work of George Marsaglia 104 * taken from 105 105 * http://groups.google.ws/group/comp.sys.sun.admin/msg/7c667186f6cbf354 106 * and 107 * http://groups.google.ws/group/comp.lang.c/msg/0e170777c6e79e8d 106 * and 107 * http://groups.google.ws/group/comp.lang.c/msg/0e170777c6e79e8d 108 108 */ 109 109 110 /* 111 A C version of a very very good 64-bit RNG is given below. 112 You should be able to adapt it to your particular needs. 113 114 It is based on the complimentary-multiple-with-carry 115 sequence 116 x(n)=a*x(n-4)+carry mod 2^64-1, 117 which works as follows: 118 Assume a certain multiplier 'a' and a base 'b'. 119 Given a current x value and a current carry 'c', 120 form: t=a*x+c 121 Then the new carry is c=floor(t/b) 122 and the new x value is x = b-1-(t mod b). 123 124 125 Ordinarily, for 32-bit mwc or cmwc sequences, the 126 value t=a*x+c can be formed in 64 bits, then the new c 127 is the top and the new x the bottom 32 bits (with a little 128 fiddling when b=2^32-1 and cmwc rather than mwc.) 129 130 131 To generate 64-bit x's, it is difficult to form 132 t=a*x+c in 128 bits then get the new c and new x 133 from the the top and bottom halves. 134 But if 'a' has a special form, for example, 135 a=2^62+2^47+2 and b=2^64-1, then the new c and 136 the new x can be formed with shifts, tests and +/-'s, 137 again with a little fiddling because b=2^64-1 rather 138 than 2^64. (The latter is not an optimal choice because, 139 being a square, it cannot be a primitive root of the 140 prime a*b^k+1, where 'k' is the 'lag': 141 x(n)=a*x(n-k)+carry mod b.) 142 But the multiplier a=2^62+2^47+2 makes a*b^4+1 a prime for 143 which b=2^64-1 is a primitive root, and getting the new x and 144 new c can be done with arithmetic on integers the size of x. 145 */ 110 /* 111 A C version of a very very good 64-bit RNG is given below. 112 You should be able to adapt it to your particular needs. 113 114 It is based on the complimentary-multiple-with-carry 115 sequence 116 x(n)=a*x(n-4)+carry mod 2^64-1, 117 which works as follows: 118 Assume a certain multiplier 'a' and a base 'b'. 119 Given a current x value and a current carry 'c', 120 form: t=a*x+c 121 Then the new carry is c=floor(t/b) 122 and the new x value is x = b-1-(t mod b). 123 124 125 Ordinarily, for 32-bit mwc or cmwc sequences, the 126 value t=a*x+c can be formed in 64 bits, then the new c 127 is the top and the new x the bottom 32 bits (with a little 128 fiddling when b=2^32-1 and cmwc rather than mwc.) 129 130 131 To generate 64-bit x's, it is difficult to form 132 t=a*x+c in 128 bits then get the new c and new x 133 from the the top and bottom halves. 134 But if 'a' has a special form, for example, 135 a=2^62+2^47+2 and b=2^64-1, then the new c and 136 the new x can be formed with shifts, tests and +/-'s, 137 again with a little fiddling because b=2^64-1 rather 138 than 2^64. (The latter is not an optimal choice because, 139 being a square, it cannot be a primitive root of the 140 prime a*b^k+1, where 'k' is the 'lag': 141 x(n)=a*x(n-k)+carry mod b.) 142 But the multiplier a=2^62+2^47+2 makes a*b^4+1 a prime for 143 which b=2^64-1 is a primitive root, and getting the new x and 144 new c can be done with arithmetic on integers the size of x. 145 */ 146 146 147 147 struct RndCtx … … 159 159 160 160 /** 161 * Initialize seeds. 162 * 161 * Initialize seeds. 162 * 163 163 * @remarks You should choose ANY 4 random 64-bit 164 164 * seeds x,y,z,w < 2^64-1 and a random seed c in … … 196 196 RTDECL(uint64_t) RTPRandU64(PRNDCTX pCtx) 197 197 { 198 uint64_t t; 199 t = (pCtx->x<<47) + (pCtx->x<<62) + (pCtx->x<<1); 200 t += pCtx->c; t+= (t < pCtx->c); 201 pCtx->c = (t<pCtx->c) + (pCtx->x>>17) + (pCtx->x>>2) + (pCtx->x>>63); 202 pCtx->x = pCtx->y; pCtx->y = pCtx->z ; pCtx->z = pCtx->w; 203 return (pCtx->w = ~(t + pCtx->c)-1); 204 } 198 uint64_t t; 199 t = (pCtx->x<<47) + (pCtx->x<<62) + (pCtx->x<<1); 200 t += pCtx->c; t+= (t < pCtx->c); 201 pCtx->c = (t<pCtx->c) + (pCtx->x>>17) + (pCtx->x>>2) + (pCtx->x>>63); 202 pCtx->x = pCtx->y; pCtx->y = pCtx->z ; pCtx->z = pCtx->w; 203 return (pCtx->w = ~(t + pCtx->c)-1); 204 } 205 205 206 206 /** 207 * Generate a 64-bit unsigned pseudo random number in the set 208 * [u64First..u64Last]. 207 * Generate a 64-bit unsigned pseudo random number in the set 208 * [u64First..u64Last]. 209 209 * 210 210 * @returns The pseudo random number. … … 240 240 pCtx->u32y ^= pCtx->u32y<<5, 241 241 pCtx->u32x + pCtx->u32y ); 242 } 242 } 243 243 244 244 /** 245 * Generate a 32-bit unsigned pseudo random number in the set 246 * [u32First..u32Last]. 245 * Generate a 32-bit unsigned pseudo random number in the set 246 * [u32First..u32Last]. 247 247 * 248 248 * @returns The pseudo random number. … … 283 283 else 284 284 { 285 RTPrintf("INFO: Random generator seed used: %x\n", RTPRandGetSeedInfo(pCtx)); 286 RTLogPrintf("INFO: Random generator seed used: %x\n", RTPRandGetSeedInfo(pCtx)); 285 RTPrintf("INFO: Random generator seed used: %x\n", RTPRandGetSeedInfo(pCtx)); 286 RTLogPrintf("INFO: Random generator seed used: %x\n", RTPRandGetSeedInfo(pCtx)); 287 287 } 288 288 } … … 481 481 VD_IMAGE_TYPE_NORMAL, u64DiskSize, 482 482 VD_IMAGE_FLAGS_NONE, "Test image", 483 &PCHS, &LCHS, VD_OPEN_FLAGS_NORMAL,483 &PCHS, &LCHS, NULL, VD_OPEN_FLAGS_NORMAL, 484 484 NULL, NULL); 485 485 CHECK("VDCreateBase()"); … … 506 506 507 507 rc = VDCreateDiff(pVD, pszBackend, pszDiffFilename, 508 VD_IMAGE_FLAGS_NONE, "Test diff image", 508 VD_IMAGE_FLAGS_NONE, "Test diff image", NULL, 509 509 VD_OPEN_FLAGS_NORMAL, NULL, NULL); 510 510 CHECK("VDCreateDiff()"); … … 587 587 VD_IMAGE_TYPE_NORMAL, u64DiskSize, 588 588 VD_IMAGE_FLAGS_NONE, "Test image", 589 &PCHS, &LCHS, VD_OPEN_FLAGS_NORMAL,589 &PCHS, &LCHS, NULL, VD_OPEN_FLAGS_NORMAL, 590 590 NULL, NULL); 591 591 CHECK("VDCreateBase()");
Note:
See TracChangeset
for help on using the changeset viewer.