diff options
author | Gilles Moris <gilles.moris@free.fr> | 2019-05-15 06:46:32 +0200 |
---|---|---|
committer | Gilles Moris <gilles.moris@free.fr> | 2019-05-15 06:46:32 +0200 |
commit | faaaa2618f965d12fc47837aa026bd123f680098 (patch) | |
tree | de07d7b9942ee7ed2282ff1a080ee2e980e92d43 /gptpart.cc | |
parent | a84363b9b1a4c0b309c8cc09a9b812fdd7784fa4 (diff) | |
download | sgdisk-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.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |