summaryrefslogtreecommitdiff
path: root/gptpart.cc
diff options
context:
space:
mode:
authorGilles Moris <gilles.moris@free.fr>2019-05-15 06:46:32 +0200
committerGilles Moris <gilles.moris@free.fr>2019-05-15 06:46:32 +0200
commitfaaaa2618f965d12fc47837aa026bd123f680098 (patch)
treede07d7b9942ee7ed2282ff1a080ee2e980e92d43 /gptpart.cc
parenta84363b9b1a4c0b309c8cc09a9b812fdd7784fa4 (diff)
downloadsgdisk-faaaa2618f965d12fc47837aa026bd123f680098.tar.gz
gdisk: use previous code when changing partition type to be idempotent like cgdisk
Diffstat (limited to 'gptpart.cc')
-rw-r--r--gptpart.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gptpart.cc b/gptpart.cc
index 0684fea..56415e1 100644
--- a/gptpart.cc
+++ b/gptpart.cc
@@ -444,13 +444,13 @@ void GPTPart::ChangeType(void) {
cout << "Current type is " << hex << GetHexType() << dec << " (" << GetTypeName() << ")\n";
do {
- cout << "Hex code or GUID (L to show codes, Enter = " << hex << DEFAULT_GPT_TYPE << dec << "): ";
+ cout << "Hex code or GUID (L to show codes, Enter = " << hex << GetHexType() << dec << "): ";
line = ReadString();
if ((line[0] == 'L') || (line[0] == 'l')) {
partitionType.ShowAllTypes();
} else {
if (line.length() == 0)
- tempType = DEFAULT_GPT_TYPE;
+ tempType = GetHexType();
else
tempType = line;
} // if/else