Changeset 85944 in vbox
- Timestamp:
- Aug 28, 2020 8:57:37 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VD.cpp
r85941 r85944 6220 6220 uOpenFlags, pVDIfsImage, pVDIfsOperation)); 6221 6221 6222 AssertPtrReturn(pVDIfsOperation, VERR_INVALID_PARAMETER); 6222 6223 PVDINTERFACEPROGRESS pIfProgress = VDIfProgressGet(pVDIfsOperation); 6223 6224 6224 6225 do 6225 6226 { 6227 /** @todo r=bird: there is no particular reason why this validation has to be 6228 * done inside the do-break-while-goto-is-false loop. (pIfProgress is 6229 * only called on success.) Could just AssertMsgReturn, rather than 6230 * complicated AssertMsgBreakStmt. */ 6226 6231 /* sanity check */ 6227 6232 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 6236 AssertMsg(pDisk->u32Signature == VDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 6233 AssertMsgBreakStmt(pDisk->u32Signature == VDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature), 6234 rc = VERR_INVALID_MAGIC); 6237 6235 6238 6236 /* Check arguments. */ … … 6261 6259 rc = VERR_INVALID_PARAMETER); 6262 6260 /* The PCHS geometry fields may be 0 to leave it for later. */ 6263 Assert MsgBreakStmt( VALID_PTR(pPCHSGeometry) /** @todo r=bird: will crash in assert message formatting if invalid. duh. */6264 &&pPCHSGeometry->cHeads <= 166261 AssertPtrBreakStmt(pPCHSGeometry, rc = VERR_INVALID_PARAMETER); 6262 AssertMsgBreakStmt( pPCHSGeometry->cHeads <= 16 6265 6263 && pPCHSGeometry->cSectors <= 63, 6266 ("pPCHSGeometry=%#p PCHS=%u/%u/%u\n", pPCHSGeometry, 6267 pPCHSGeometry->cCylinders, pPCHSGeometry->cHeads, 6268 pPCHSGeometry->cSectors), 6264 ("PCHS=%u/%u/%u\n", pPCHSGeometry->cCylinders, pPCHSGeometry->cHeads, pPCHSGeometry->cSectors), 6269 6265 rc = VERR_INVALID_PARAMETER); 6270 6266 /* The LCHS geometry fields may be 0 to leave it to later autodetection. */ 6271 Assert MsgBreakStmt( VALID_PTR(pLCHSGeometry) /** @todo r=bird: will crash in assert message formatting if invalid. duh. */6272 &&pLCHSGeometry->cHeads <= 2556267 AssertPtrBreakStmt(pLCHSGeometry, rc = VERR_INVALID_PARAMETER); 6268 AssertMsgBreakStmt( pLCHSGeometry->cHeads <= 255 6273 6269 && pLCHSGeometry->cSectors <= 63, 6274 ("pLCHSGeometry=%#p LCHS=%u/%u/%u\n", pLCHSGeometry, 6275 pLCHSGeometry->cCylinders, pLCHSGeometry->cHeads, 6276 pLCHSGeometry->cSectors), 6270 ("LCHS=%u/%u/%u\n", pLCHSGeometry->cCylinders, pLCHSGeometry->cHeads, pLCHSGeometry->cSectors), 6277 6271 rc = VERR_INVALID_PARAMETER); 6278 6272 /* The UUID may be NULL. */ … … 6283 6277 ("uOpenFlags=%#x\n", uOpenFlags), 6284 6278 rc = VERR_INVALID_PARAMETER); 6279 6280 AssertPtrBreakStmt(pVDIfsImage, rc = VERR_INVALID_PARAMETER); 6285 6281 6286 6282 /* Check state. Needs a temporary read lock. Holding the write lock
Note:
See TracChangeset
for help on using the changeset viewer.