Changeset 10781 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Jul 21, 2008 2:45:28 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VDICore.h
r10715 r10781 310 310 } 311 311 312 #ifdef VBOX_VDICORE_VD 313 DECLINLINE(unsigned) getImageFlags(PVDIHEADER ph) 314 { 315 switch (GET_MAJOR_HEADER_VERSION(ph)) 316 { 317 case 0: 318 /* VDI image flag conversion to VD image flags. */ 319 return ph->u.v0.fFlags << 8; 320 case 1: 321 /* VDI image flag conversion to VD image flags. */ 322 return ph->u.v1.fFlags << 8; 323 } 324 AssertFailed(); 325 return 0; 326 } 327 #else /* !VBOX_VDICORE_VD */ 312 328 DECLINLINE(unsigned) getImageFlags(PVDIHEADER ph) 313 329 { … … 320 336 return 0; 321 337 } 338 #endif /* !VBOX_VDICORE_VD */ 322 339 323 340 DECLINLINE(char *) getImageComment(PVDIHEADER ph) -
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r10715 r10781 129 129 ? VDI_IMAGE_TYPE_NORMAL 130 130 : VDI_IMAGE_TYPE_DIFF); 131 pHeader->u.v1.fFlags = uImageFlags;131 pHeader->u.v1.fFlags = (uImageFlags & VD_VDI_IMAGE_FLAGS_ZERO_EXPAND) ? 1 : 0; 132 132 #ifdef VBOX_STRICT 133 133 char achZero[VDI_IMAGE_COMMENT_SIZE] = {0}; … … 1319 1319 1320 1320 if (pImage) 1321 uImageFlags = getImageFlags(&pImage->Header);1321 uImageFlags = pImage->uImageFlags; 1322 1322 else 1323 1323 uImageFlags = 0;
Note:
See TracChangeset
for help on using the changeset viewer.