VirtualBox

Ignore:
Timestamp:
Jun 16, 2009 1:40:30 PM (15 years ago)
Author:
vboxsync
Message:

Frontends/VBoxManage: fix creating raw VMDKs for odd logical partition cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r20290 r20629  
    11581158                RawDescriptor.pPartitions[i].cbPartition =  partitions.aPartitions[i].uSize * 512;
    11591159            RawDescriptor.pPartitions[i].uPartitionDataStart = partitions.aPartitions[i].uPartDataStart * 512;
    1160             RawDescriptor.pPartitions[i].cbPartitionData = partitions.aPartitions[i].cPartDataSectors * 512;
     1160            /** @todo the clipping below isn't 100% accurate, as it should
     1161             * actually clip to the track size. However that's easier said
     1162             * than done as figuring out the track size is heuristics. */
     1163            RawDescriptor.pPartitions[i].cbPartitionData = RT_MIN(partitions.aPartitions[i].cPartDataSectors, 63) * 512;
    11611164            if (RawDescriptor.pPartitions[i].cbPartitionData)
    11621165            {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette