Changeset 85941 in vbox for trunk/src/VBox/Storage
- Timestamp:
- Aug 28, 2020 7:41:03 PM (4 years ago)
- Location:
- trunk/src/VBox/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VD.cpp
r85121 r85941 6226 6226 /* sanity check */ 6227 6227 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 6228 AssertPtrBreakStmt(pszBackend, rc = VERR_INVALID_PARAMETER); 6229 AssertPtrBreakStmt(pszFilename, rc = VERR_INVALID_PARAMETER); 6230 AssertPtrBreakStmt(pPCHSGeometry, rc = VERR_INVALID_PARAMETER); 6231 AssertPtrBreakStmt(pLCHSGeometry, rc = VERR_INVALID_PARAMETER); 6232 AssertPtrBreakStmt(pUuid, rc = VERR_INVALID_PARAMETER); 6233 AssertPtrBreakStmt(pVDIfsImage, rc = VERR_INVALID_PARAMETER); 6234 AssertPtrBreakStmt(pVDIfsOperation, rc = VERR_INVALID_PARAMETER); 6235 6228 6236 AssertMsg(pDisk->u32Signature == VDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 6229 6237 … … 6235 6243 ("pszFilename=%#p \"%s\"\n", pszFilename, pszFilename), 6236 6244 rc = VERR_INVALID_PARAMETER); 6237 AssertMsgBreakStmt(cbSize ,6245 AssertMsgBreakStmt(cbSize || (uImageFlags & VD_VMDK_IMAGE_FLAGS_RAWDISK), 6238 6246 ("cbSize=%llu\n", cbSize), 6239 6247 rc = VERR_INVALID_PARAMETER); 6240 if (cbSize % 512 )6248 if (cbSize % 512 && !(uImageFlags & VD_VMDK_IMAGE_FLAGS_RAWDISK)) 6241 6249 { 6242 6250 rc = vdError(pDisk, VERR_VD_INVALID_SIZE, RT_SRC_POS, … … 6248 6256 ("uImageFlags=%#x\n", uImageFlags), 6249 6257 rc = VERR_INVALID_PARAMETER); 6258 AssertMsgBreakStmt( !(uImageFlags & VD_VMDK_IMAGE_FLAGS_RAWDISK) 6259 || !(uImageFlags & ~(VD_VMDK_IMAGE_FLAGS_RAWDISK | VD_IMAGE_FLAGS_FIXED)), 6260 ("uImageFlags=%#x\n", uImageFlags), 6261 rc = VERR_INVALID_PARAMETER); 6250 6262 /* The PCHS geometry fields may be 0 to leave it for later. */ 6251 AssertMsgBreakStmt( VALID_PTR(pPCHSGeometry) 6263 AssertMsgBreakStmt( VALID_PTR(pPCHSGeometry) /** @todo r=bird: will crash in assert message formatting if invalid. duh. */ 6252 6264 && pPCHSGeometry->cHeads <= 16 6253 6265 && pPCHSGeometry->cSectors <= 63, … … 6257 6269 rc = VERR_INVALID_PARAMETER); 6258 6270 /* The LCHS geometry fields may be 0 to leave it to later autodetection. */ 6259 AssertMsgBreakStmt( VALID_PTR(pLCHSGeometry) 6271 AssertMsgBreakStmt( VALID_PTR(pLCHSGeometry) /** @todo r=bird: will crash in assert message formatting if invalid. duh. */ 6260 6272 && pLCHSGeometry->cHeads <= 255 6261 6273 && pLCHSGeometry->cSectors <= 63, … … 6336 6348 if ( ( (uImageFlags & VD_VMDK_IMAGE_FLAGS_SPLIT_2G) 6337 6349 && !(pImage->Backend->uBackendCaps & VD_CAP_CREATE_SPLIT_2G)) 6338 || ( (uImageFlags & VD_VMDK_IMAGE_FLAGS_STREAM_OPTIMIZED) 6350 || ( (uImageFlags & ( VD_VMDK_IMAGE_FLAGS_STREAM_OPTIMIZED 6351 | VD_VMDK_IMAGE_FLAGS_RAWDISK)) 6339 6352 && RTStrICmp(pszBackend, "VMDK"))) 6340 6353 { -
trunk/src/VBox/Storage/testcase/Makefile.kmk
r85378 r85941 111 111 vbox-img_TEMPLATE = VBoxR3Static 112 112 vbox-img_DEFS += IN_VBOXDDU IN_VBOXDDU_STATIC VBOX_HDD_NO_DYNAMIC_BACKENDS 113 vbox-img_INCS += \ 114 ../../Main/include 113 115 vbox-img_SOURCES = \ 114 116 vbox-img.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.