Changeset 18179 in vbox for trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
- Timestamp:
- Mar 24, 2009 1:25:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r18149 r18179 2905 2905 if (RT_FAILURE(rc)) 2906 2906 goto out; 2907 2907 2908 /* As we're dealing with a monolithic image here, there must 2908 2909 * be a descriptor embedded in the image file. */ … … 2911 2912 rc = vmdkError(pImage, VERR_VD_VMDK_INVALID_HEADER, RT_SRC_POS, N_("VMDK: monolithic image without descriptor in '%s'"), pImage->pszFilename); 2912 2913 goto out; 2914 } 2915 /* HACK: extend the descriptor if it is unusually small and it fits in 2916 * the unused space after the image header. Allows opening VMDK files 2917 * with extremely small descriptor in read/write mode. */ 2918 if ( !(pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY) 2919 && pExtent->cDescriptorSectors < 3 2920 && (int64_t)pExtent->uSectorGD - pExtent->uDescriptorSector >= 4 2921 && (!pExtent->uSectorRGD || (int64_t)pExtent->uSectorRGD - pExtent->uDescriptorSector >= 4)) 2922 { 2923 pExtent->cDescriptorSectors = 4; 2924 pExtent->fMetaDirty = true; 2913 2925 } 2914 2926 /* Read the descriptor from the extent. */
Note:
See TracChangeset
for help on using the changeset viewer.