Changeset 56918 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jul 10, 2015 3:10:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r56912 r56918 94 94 /** partition number */ 95 95 unsigned uIndex; 96 /** partition number (internal only, windows specific numbering) */ 97 unsigned uIndexWin; 96 98 /** partition type */ 97 99 unsigned uType; … … 831 833 PHOSTPARTITION pCP = &pPart->aPartitions[pPart->cPartitions++]; 832 834 pCP->uIndex = currentEntry + 1; 835 pCP->uIndexWin = currentEntry + 1; 833 836 pCP->uType = 0; 834 837 pCP->uStartCylinder = 0; … … 843 846 { 844 847 pCP->uIndex = 0; 848 pCP->uIndexWin = 0; 845 849 --pPart->cPartitions; 846 850 break; … … 867 871 868 872 unsigned uExtended = (unsigned)-1; 873 unsigned uIndexWin = 1; 869 874 870 875 for (unsigned i = 0; i < 4; i++) … … 890 895 { 891 896 if (uExtended == (unsigned)-1) 897 { 892 898 uExtended = (unsigned)(pCP - pPart->aPartitions); 899 pCP->uIndexWin = 0; 900 } 893 901 else 894 902 { … … 896 904 return VERR_INVALID_PARAMETER; 897 905 } 906 } 907 else 908 { 909 pCP->uIndexWin = uIndexWin; 910 uIndexWin++; 898 911 } 899 912 } … … 931 944 PHOSTPARTITION pCP = &pPart->aPartitions[pPart->cPartitions++]; 932 945 pCP->uIndex = uIndex; 946 pCP->uIndexWin = uIndexWin; 933 947 pCP->uType = p[4]; 934 948 pCP->uStartCylinder = (uint32_t)p[3] + ((uint32_t)(p[2] & 0xc0) << 2); … … 954 968 else if (PARTTYPE_IS_EXTENDED(p[4])) 955 969 { 956 uExtended = uIndex++; 970 uExtended = uIndex; 971 uIndex++; 972 uIndexWin++; 957 973 uOffset = RT_MAKE_U32_FROM_U8(p[8], p[9], p[10], p[11]); 958 974 } … … 1658 1674 RTStrAPrintf(&psz, "\\\\.\\Harddisk%sPartition%u", 1659 1675 rawdisk.c_str() + 17, 1660 partitions.aPartitions[i].uIndex );1676 partitions.aPartitions[i].uIndexWin); 1661 1677 if (!psz) 1662 1678 { 1663 1679 vrc = VERR_NO_STR_MEMORY; 1664 RTMsgError("Cannot create reference to individual partition %u , rc=%Rrc",1665 partitions.aPartitions[i].uIndex, vrc);1680 RTMsgError("Cannot create reference to individual partition %u (numbered %u), rc=%Rrc", 1681 partitions.aPartitions[i].uIndex, partitions.aPartitions[i].uIndexWin, vrc); 1666 1682 goto out; 1667 1683 }
Note:
See TracChangeset
for help on using the changeset viewer.