aboutsummaryrefslogtreecommitdiff
path: root/parttypes.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2010-03-07 22:16:07 -0500
committersrs5694 <srs5694@users.sourceforge.net>2010-03-07 22:16:07 -0500
commit55d926192adc984462509b2966e23bc0d1129bbd (patch)
treebff8bea805e3fb0e15f7f3a0cd26a20fa12c5f29 /parttypes.cc
parentea17cffd083c839b7af3560d55ba697667277901 (diff)
downloadgptfdisk-55d926192adc984462509b2966e23bc0d1129bbd.tar.gz
Updated project files for 0.6.5 release version.
Diffstat (limited to 'parttypes.cc')
-rw-r--r--parttypes.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/parttypes.cc b/parttypes.cc
index 1bda724..968be74 100644
--- a/parttypes.cc
+++ b/parttypes.cc
@@ -29,8 +29,6 @@ AType* PartType::lastType = NULL;
// related codes similar numbers and (given appropriate entry positions
// in the linked list) keeps them together in the listings generated
// by typing "L" at the main gdisk menu.
-// See http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
-// for a list of MBR partition type codes.
PartType::PartType(void) : GUIDData() {
numInstances++;
if (numInstances == 1) {
@@ -67,6 +65,8 @@ PartType::~PartType(void) {
// Add all partition type codes to the internal linked-list structure.
// Used by constructors.
+// See http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
+// for a list of MBR partition type codes.
void PartType::AddAllTypes(void) {
// Start with the "unused entry," which should normally appear only
// on empty partition table entries....
@@ -161,7 +161,7 @@ void PartType::AddAllTypes(void) {
AddType(0xfd00, "A19D880F-05FC-4D3B-A006-743F0F84911E", "Linux RAID");
// Note: DO NOT use the 0xffff code; that's reserved to indicate an
- // unknown type code.
+ // unknown GUID type code.
} // PartType::AddAllTypes()
// Add a single type to the linked list of types. Returns 1 if operation
@@ -195,12 +195,9 @@ PartType & PartType::operator=(uint16_t ID) {
AType* theItem = allTypes;
int found = 0;
- // Assign a default value....
- GUIDData::operator=("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"); // 0700, Linux/Windows data
-
// Now search the type list for a match to the ID....
while ((theItem != NULL) && (!found)) {
- if (theItem->MBRType == ID) { // found it!
+ if (theItem->MBRType == ID) {
GUIDData::operator=(theItem->GUIDType);
found = 1;
} else {
@@ -208,6 +205,8 @@ PartType & PartType::operator=(uint16_t ID) {
} // if/else
} // while
if (!found) {
+ // Assign a default value....
+ GUIDData::operator=("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"); // 0700, Linux/Windows data
cout.setf(ios::uppercase);
cout.fill('0');
cout << "Exact type match not found for type code ";
@@ -278,7 +277,8 @@ void PartType::ShowAllTypes(void) {
cout.width(4);
cout << hex << thisType->MBRType << " ";
cout << thisType->name.substr(0, 20);
- for (i = 0; i < (20 - (thisType->name.substr(0, 20).length())); i++) cout << " ";
+ for (i = 0; i < (20 - (thisType->name.substr(0, 20).length())); i++)
+ cout << " ";
if ((colCount % 3) == 0)
cout << "\n";
else