Changeset 85884 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Aug 25, 2020 7:59:36 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 140060
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r85221 r85884 1516 1516 { 1517 1517 RawDescriptor.uFlags = VDISKRAW_DISK; 1518 RawDescriptor.pszRawDisk = rawdisk.c_str();1518 RawDescriptor.pszRawDisk = (char *)rawdisk.c_str(); 1519 1519 } 1520 1520 else … … 1564 1564 } 1565 1565 1566 RawDescriptor. uPartitioningType = partitions.uPartitioningType;1566 RawDescriptor.enmPartitioningType = partitions.uPartitioningType; 1567 1567 1568 1568 for (unsigned i = 0; i < partitions.cPartitions; i++) … … 1605 1605 * prevent overlapping data areas on the resulting image. */ 1606 1606 pPartDesc->cbData = RT_MIN(partitions.aPartitions[i].cPartDataSectors, 63) * 512; 1607 pPartDesc-> uStart= partitions.aPartitions[i].uPartDataStart * 512;1607 pPartDesc->offStartInVDisk = partitions.aPartitions[i].uPartDataStart * 512; 1608 1608 Assert(pPartDesc->cbData - (size_t)pPartDesc->cbData == 0); 1609 1609 void *pPartData = RTMemAlloc((size_t)pPartDesc->cbData); … … 1730 1730 1731 1731 pPartDesc->pszRawDevice = pszRawName; 1732 pPartDesc-> uStartOffset= uStartOffset;1732 pPartDesc->offStartInDevice = uStartOffset; 1733 1733 } 1734 1734 else 1735 1735 { 1736 1736 pPartDesc->pszRawDevice = NULL; 1737 pPartDesc-> uStartOffset= 0;1738 } 1739 1740 pPartDesc-> uStart= partitions.aPartitions[i].uStart * 512;1737 pPartDesc->offStartInDevice = 0; 1738 } 1739 1740 pPartDesc->offStartInVDisk = partitions.aPartitions[i].uStart * 512; 1741 1741 pPartDesc->cbData = partitions.aPartitions[i].uSize * 512; 1742 1742 } … … 1746 1746 { 1747 1747 unsigned uMinIdx = i; 1748 uint64_t uMinVal = RawDescriptor.pPartDescs[i]. uStart;1748 uint64_t uMinVal = RawDescriptor.pPartDescs[i].offStartInVDisk; 1749 1749 for (unsigned j = i + 1; j < RawDescriptor.cPartDescs; j++) 1750 1750 { 1751 if (RawDescriptor.pPartDescs[j]. uStart< uMinVal)1751 if (RawDescriptor.pPartDescs[j].offStartInVDisk < uMinVal) 1752 1752 { 1753 1753 uMinIdx = j; 1754 uMinVal = RawDescriptor.pPartDescs[j]. uStart;1754 uMinVal = RawDescriptor.pPartDescs[j].offStartInVDisk; 1755 1755 } 1756 1756 } … … 1772 1772 if (RawDescriptor.pPartDescs[i].pvPartitionData) 1773 1773 { 1774 RawDescriptor.pPartDescs[i].cbData = RT_MIN(RawDescriptor.pPartDescs[i+1].uStart - RawDescriptor.pPartDescs[i].uStart, RawDescriptor.pPartDescs[i].cbData); 1774 RawDescriptor.pPartDescs[i].cbData = RT_MIN( RawDescriptor.pPartDescs[i+1].offStartInVDisk 1775 - RawDescriptor.pPartDescs[i].offStartInVDisk, 1776 RawDescriptor.pPartDescs[i].cbData); 1775 1777 if (!RawDescriptor.pPartDescs[i].cbData) 1776 1778 { 1777 if (RawDescriptor. uPartitioningType == VDISKPARTTYPE_MBR)1779 if (RawDescriptor.enmPartitioningType == VDISKPARTTYPE_MBR) 1778 1780 { 1779 1781 RTMsgError("MBR/EPT overlaps with data area");
Note:
See TracChangeset
for help on using the changeset viewer.