srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 1 | // |
| 2 | // C++ Implementation: gptpart |
| 3 | // |
| 4 | // Description: Class to implement a SINGLE GPT partition |
| 5 | // |
| 6 | // |
| 7 | // Author: Rod Smith <rodsmith@rodsbooks.com>, (C) 2009 |
| 8 | // |
| 9 | // Copyright: See COPYING file that comes with this distribution |
| 10 | // |
| 11 | // |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 12 | // This program is copyright (c) 2009 by Roderick W. Smith. It is distributed |
| 13 | // under the terms of the GNU GPL version 2, as detailed in the COPYING file. |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 14 | |
| 15 | #define __STDC_LIMIT_MACROS |
| 16 | #define __STDC_CONSTANT_MACROS |
| 17 | |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 18 | #include <string.h> |
srs5694 | fed16d0 | 2010-01-27 23:03:40 -0500 | [diff] [blame] | 19 | #include <stdio.h> |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 20 | #include <unicode/ustdio.h> |
srs5694 | fed16d0 | 2010-01-27 23:03:40 -0500 | [diff] [blame] | 21 | #include <iostream> |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 22 | #include "gptpart.h" |
| 23 | #include "attributes.h" |
| 24 | |
| 25 | using namespace std; |
| 26 | |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 27 | GPTPart::GPTPart(void) { |
srs5694 | 55d9261 | 2010-03-07 22:16:07 -0500 | [diff] [blame] | 28 | partitionType.Zero(); |
| 29 | uniqueGUID.Zero(); |
| 30 | firstLBA = 0; |
| 31 | lastLBA = 0; |
| 32 | attributes = 0; |
srs5694 | 64cbd17 | 2011-03-01 22:03:54 -0500 | [diff] [blame] | 33 | memset(name, 0, NAME_SIZE); |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 34 | } // Default constructor |
| 35 | |
| 36 | GPTPart::~GPTPart(void) { |
| 37 | } // destructor |
| 38 | |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 39 | // Return the gdisk-specific two-byte hex code for the partition |
srs5694 | bf8950c | 2011-03-12 01:23:12 -0500 | [diff] [blame] | 40 | uint16_t GPTPart::GetHexType(void) const { |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 41 | return partitionType.GetHexType(); |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 42 | } // GPTPart::GetHexType() |
| 43 | |
| 44 | // Return a plain-text description of the partition type (e.g., "Linux/Windows |
| 45 | // data" or "Linux swap"). |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 46 | string GPTPart::GetTypeName(void) { |
| 47 | return partitionType.TypeName(); |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 48 | } // GPTPart::GetNameType() |
| 49 | |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 50 | // Return a Unicode description of the partition type (e.g., "Linux/Windows |
| 51 | // data" or "Linux swap"). |
| 52 | UnicodeString GPTPart::GetUTypeName(void) { |
| 53 | return partitionType.UTypeName(); |
| 54 | /* UnicodeString temp; |
| 55 | |
| 56 | temp = temp.fromUTF8(partitionType.TypeName()); |
| 57 | return temp; */ |
| 58 | } // GPTPart::GetNameType() |
| 59 | |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 60 | // Compute and return the partition's length (or 0 if the end is incorrectly |
| 61 | // set before the beginning). |
srs5694 | bf8950c | 2011-03-12 01:23:12 -0500 | [diff] [blame] | 62 | uint64_t GPTPart::GetLengthLBA(void) const { |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 63 | uint64_t length = 0; |
srs5694 | 55d9261 | 2010-03-07 22:16:07 -0500 | [diff] [blame] | 64 | |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 65 | if (firstLBA <= lastLBA) |
| 66 | length = lastLBA - firstLBA + UINT64_C(1); |
| 67 | return length; |
| 68 | } // GPTPart::GetLengthLBA() |
| 69 | |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 70 | /* // Return partition's name field, converted to a C++ ASCII string |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 71 | string GPTPart::GetDescription(void) { |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 72 | string theName; |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 73 | int i; |
| 74 | |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 75 | theName = ""; |
| 76 | for (i = 0; i < NAME_SIZE; i += 2) { |
| 77 | if (name[i] != '\0') |
| 78 | theName += name[i]; |
| 79 | } // for |
| 80 | return theName; |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 81 | } // GPTPart::GetDescription() */ |
| 82 | |
| 83 | UnicodeString GPTPart::GetDescription(void) { |
| 84 | UnicodeString theName; |
| 85 | UChar *temp; |
| 86 | int i; |
| 87 | |
| 88 | theName = ""; |
| 89 | temp = (UChar*) name; |
| 90 | for (i = 0; i < NAME_SIZE / 2; i++) { |
| 91 | if (temp[i] != '\0') |
| 92 | theName += temp[i]; |
| 93 | } // for |
| 94 | return theName; |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 95 | } // GPTPart::GetDescription() |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 96 | |
srs5694 | 08bb0da | 2010-02-19 17:19:55 -0500 | [diff] [blame] | 97 | // Return 1 if the partition is in use |
| 98 | int GPTPart::IsUsed(void) { |
| 99 | return (firstLBA != UINT64_C(0)); |
| 100 | } // GPTPart::IsUsed() |
| 101 | |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 102 | // Set the type code to the specified one. Also changes the partition |
| 103 | // name *IF* the current name is the generic one for the current partition |
| 104 | // type. |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 105 | void GPTPart::SetType(PartType t) { |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 106 | if (GetDescription() == partitionType.UTypeName()) { |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 107 | SetName(t.TypeName()); |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 108 | } // if |
| 109 | partitionType = t; |
| 110 | } // GPTPart::SetType() |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 111 | |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 112 | // Set the name for a partition to theName, or prompt for a name if |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 113 | // theName is empty, using a C++-style string as input. |
| 114 | void GPTPart::SetName(string theName) { |
| 115 | UnicodeString uString; |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 116 | |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 117 | uString = theName.c_str(); |
| 118 | SetName(uString); |
| 119 | } // GPTPart::SetName() |
| 120 | |
| 121 | // Set the name for a partition to theName, or prompt for a name |
| 122 | // if theName is empty, using a Unicode string as input. |
| 123 | void GPTPart::SetName(UnicodeString theName) { |
| 124 | int i; |
| 125 | UChar temp[NAME_SIZE / 2]; |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 126 | |
srs5694 | fed16d0 | 2010-01-27 23:03:40 -0500 | [diff] [blame] | 127 | if (theName == "") { // No name specified, so get one from the user |
| 128 | cout << "Enter name: "; |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 129 | theName = ReadUString(); |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 130 | } // if |
| 131 | |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 132 | // Copy the C++-style string from newName into a form that the GPT |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 133 | // table will accept.... |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 134 | memset(temp, 0, NAME_SIZE); |
| 135 | for (i = 0; i < theName.length(); i++) |
| 136 | temp[i] = theName[i]; |
| 137 | memcpy(name, temp, NAME_SIZE); |
srs5694 | a0eb11a | 2009-08-29 15:00:08 -0400 | [diff] [blame] | 138 | } // GPTPart::SetName() |
| 139 | |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 140 | // Set the name for the partition based on the current GUID partition type |
| 141 | // code's associated name |
| 142 | void GPTPart::SetDefaultDescription(void) { |
| 143 | SetName(partitionType.TypeName()); |
| 144 | } // GPTPart::SetDefaultDescription() |
| 145 | |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 146 | GPTPart & GPTPart::operator=(const GPTPart & orig) { |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 147 | partitionType = orig.partitionType; |
| 148 | uniqueGUID = orig.uniqueGUID; |
| 149 | firstLBA = orig.firstLBA; |
| 150 | lastLBA = orig.lastLBA; |
| 151 | attributes = orig.attributes; |
srs5694 | 64cbd17 | 2011-03-01 22:03:54 -0500 | [diff] [blame] | 152 | memcpy(name, orig.name, NAME_SIZE); |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 153 | return *this; |
| 154 | } // assignment operator |
| 155 | |
srs5694 | 9a46b04 | 2011-03-15 00:34:10 -0400 | [diff] [blame] | 156 | // Compare the values, and return a bool result. |
| 157 | // Because this is intended for sorting and a firstLBA value of 0 denotes |
| 158 | // a partition that's not in use and so that should be sorted upwards, |
| 159 | // we return the opposite of the usual arithmetic result when either |
| 160 | // firstLBA value is 0. |
| 161 | bool GPTPart::operator<(const GPTPart &other) const { |
srs5694 | 9a46b04 | 2011-03-15 00:34:10 -0400 | [diff] [blame] | 162 | if (firstLBA && other.firstLBA) |
| 163 | return (firstLBA < other.firstLBA); |
| 164 | else |
| 165 | return (other.firstLBA < firstLBA); |
| 166 | } // GPTPart::operator<() |
| 167 | |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 168 | // Display summary information; does nothing if the partition is empty. |
| 169 | void GPTPart::ShowSummary(int partNum, uint32_t blockSize) { |
srs5694 | 01f7f08 | 2011-03-15 23:53:31 -0400 | [diff] [blame] | 170 | string sizeInIeee; |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 171 | UnicodeString description; |
srs5694 | 64cbd17 | 2011-03-01 22:03:54 -0500 | [diff] [blame] | 172 | size_t i; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 173 | |
| 174 | if (firstLBA != 0) { |
srs5694 | 01f7f08 | 2011-03-15 23:53:31 -0400 | [diff] [blame] | 175 | sizeInIeee = BytesToIeee(lastLBA - firstLBA + 1, blockSize); |
srs5694 | 08bb0da | 2010-02-19 17:19:55 -0500 | [diff] [blame] | 176 | cout.fill(' '); |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 177 | cout.width(4); |
| 178 | cout << partNum + 1 << " "; |
| 179 | cout.width(14); |
| 180 | cout << firstLBA << " "; |
| 181 | cout.width(14); |
| 182 | cout << lastLBA << " "; |
srs5694 | 01f7f08 | 2011-03-15 23:53:31 -0400 | [diff] [blame] | 183 | cout << BytesToIeee(lastLBA - firstLBA + 1, blockSize) << " "; |
| 184 | if (sizeInIeee.length() < 10) |
| 185 | for (i = 0; i < 10 - sizeInIeee.length(); i++) |
| 186 | cout << " "; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 187 | cout.fill('0'); |
| 188 | cout.width(4); |
| 189 | cout.setf(ios::uppercase); |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 190 | cout << hex << partitionType.GetHexType() << " " << dec; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 191 | cout.fill(' '); |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 192 | // description = GetDescription(); |
| 193 | GetDescription().extractBetween(0, 24, description); |
| 194 | cout << description << "\n"; |
| 195 | // for (i = 0; i < 23; i++) |
| 196 | // cout << (char) description.; |
| 197 | // cout << GetDescription().tempSubString(0, 23) << "\n"; |
| 198 | // cout << GetDescription().substr(0, 23) << "\n"; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 199 | cout.fill(' '); |
| 200 | } // if |
| 201 | } // GPTPart::ShowSummary() |
| 202 | |
| 203 | // Show detailed partition information. Does nothing if the partition is |
| 204 | // empty (as determined by firstLBA being 0). |
| 205 | void GPTPart::ShowDetails(uint32_t blockSize) { |
| 206 | uint64_t size; |
| 207 | |
| 208 | if (firstLBA != 0) { |
srs5694 | 5a08175 | 2010-09-24 20:39:41 -0400 | [diff] [blame] | 209 | cout << "Partition GUID code: " << partitionType; |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 210 | cout << " (" << partitionType.TypeName() << ")\n"; |
srs5694 | 5a08175 | 2010-09-24 20:39:41 -0400 | [diff] [blame] | 211 | cout << "Partition unique GUID: " << uniqueGUID << "\n"; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 212 | |
| 213 | cout << "First sector: " << firstLBA << " (at " |
srs5694 | 01f7f08 | 2011-03-15 23:53:31 -0400 | [diff] [blame] | 214 | << BytesToIeee(firstLBA, blockSize) << ")\n"; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 215 | cout << "Last sector: " << lastLBA << " (at " |
srs5694 | 01f7f08 | 2011-03-15 23:53:31 -0400 | [diff] [blame] | 216 | << BytesToIeee(lastLBA, blockSize) << ")\n"; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 217 | size = (lastLBA - firstLBA + 1); |
| 218 | cout << "Partition size: " << size << " sectors (" |
srs5694 | 01f7f08 | 2011-03-15 23:53:31 -0400 | [diff] [blame] | 219 | << BytesToIeee(size, blockSize) << ")\n"; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 220 | cout << "Attribute flags: "; |
| 221 | cout.fill('0'); |
| 222 | cout.width(16); |
| 223 | cout << hex; |
| 224 | cout << attributes << "\n"; |
| 225 | cout << dec; |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 226 | cout << "Partition name: " << GetDescription() << "\n"; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 227 | cout.fill(' '); |
| 228 | } // if |
| 229 | } // GPTPart::ShowDetails() |
| 230 | |
| 231 | // Blank (delete) a single partition |
| 232 | void GPTPart::BlankPartition(void) { |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 233 | uniqueGUID.Zero(); |
| 234 | partitionType.Zero(); |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 235 | firstLBA = 0; |
| 236 | lastLBA = 0; |
| 237 | attributes = 0; |
srs5694 | 64cbd17 | 2011-03-01 22:03:54 -0500 | [diff] [blame] | 238 | memset(name, 0, NAME_SIZE); |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 239 | } // GPTPart::BlankPartition |
| 240 | |
| 241 | // Returns 1 if the two partitions overlap, 0 if they don't |
| 242 | int GPTPart::DoTheyOverlap(const GPTPart & other) { |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 243 | // Don't bother checking unless these are defined (both start and end points |
| 244 | // are 0 for undefined partitions, so just check the start points) |
srs5694 | 64cbd17 | 2011-03-01 22:03:54 -0500 | [diff] [blame] | 245 | return firstLBA && other.firstLBA && |
| 246 | (firstLBA <= other.lastLBA) != (lastLBA < other.firstLBA); |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 247 | } // GPTPart::DoTheyOverlap() |
| 248 | |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 249 | // Reverse the bytes of integral data types and of the UTF-16LE name; |
| 250 | // used on big-endian systems. |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 251 | void GPTPart::ReversePartBytes(void) { |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 252 | int i; |
| 253 | |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 254 | ReverseBytes(&firstLBA, 8); |
| 255 | ReverseBytes(&lastLBA, 8); |
| 256 | ReverseBytes(&attributes, 8); |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 257 | for (i = 0; i < NAME_SIZE; i += 2) |
| 258 | ReverseBytes(name + i, 2); |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 259 | } // GPTPart::ReverseBytes() |
| 260 | |
| 261 | /**************************************** |
| 262 | * Functions requiring user interaction * |
| 263 | ****************************************/ |
| 264 | |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 265 | // Change the type code on the partition. Also changes the name if the original |
| 266 | // name is the generic one for the partition type. |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 267 | void GPTPart::ChangeType(void) { |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 268 | string line; |
srs5694 | 64cbd17 | 2011-03-01 22:03:54 -0500 | [diff] [blame] | 269 | int changeName; |
srs5694 | 82f3f0b | 2010-09-22 10:50:24 -0400 | [diff] [blame] | 270 | PartType tempType = (GUIDData) "00000000-0000-0000-0000-000000000000"; |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 271 | |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 272 | changeName = (GetDescription() == GetUTypeName()); |
srs5694 | 55d9261 | 2010-03-07 22:16:07 -0500 | [diff] [blame] | 273 | |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 274 | cout << "Current type is '" << GetTypeName() << "'\n"; |
srs5694 | 82f3f0b | 2010-09-22 10:50:24 -0400 | [diff] [blame] | 275 | do { |
| 276 | cout << "Hex code or GUID (L to show codes, Enter = 0700): "; |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 277 | line = ReadString(); |
srs5694 | 82f3f0b | 2010-09-22 10:50:24 -0400 | [diff] [blame] | 278 | if ((line[0] == 'L') || (line[0] == 'l')) { |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 279 | partitionType.ShowAllTypes(); |
srs5694 | 82f3f0b | 2010-09-22 10:50:24 -0400 | [diff] [blame] | 280 | } else { |
srs5694 | 5a60853 | 2011-03-17 13:53:01 -0400 | [diff] [blame^] | 281 | if (line.length() == 0) |
srs5694 | 82f3f0b | 2010-09-22 10:50:24 -0400 | [diff] [blame] | 282 | tempType = 0x0700; |
| 283 | else |
| 284 | tempType = line; |
| 285 | } // if/else |
| 286 | } while (tempType == (GUIDData) "00000000-0000-0000-0000-000000000000"); |
| 287 | partitionType = tempType; |
srs5694 | 6699b01 | 2010-02-04 00:55:30 -0500 | [diff] [blame] | 288 | cout << "Changed type of partition to '" << partitionType.TypeName() << "'\n"; |
| 289 | if (changeName) { |
| 290 | SetDefaultDescription(); |
| 291 | } // if |
srs5694 | 0a69731 | 2010-01-28 21:10:52 -0500 | [diff] [blame] | 292 | } // GPTPart::ChangeType() |