diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-03-28 07:27:06 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-03-28 07:27:06 +0000 |
commit | 06cb80687c77cec67614ca5367cefdc509ecf746 (patch) | |
tree | cb5aace965dfdc6bc506df908b473cdf2b676e21 | |
parent | b27d27c548f2cdfa7dae1a64ff92ee3889c50a87 (diff) | |
parent | 9c50b5e176b95034b54d04856388ac3be6132076 (diff) | |
download | gptfdisk-pie-cts-release.tar.gz |
Snap for 4683893 from 9c50b5e176b95034b54d04856388ac3be6132076 to pi-releaseandroid-vts-9.0_r9android-vts-9.0_r8android-vts-9.0_r7android-vts-9.0_r6android-vts-9.0_r5android-vts-9.0_r4android-vts-9.0_r19android-vts-9.0_r18android-vts-9.0_r17android-vts-9.0_r16android-vts-9.0_r15android-vts-9.0_r14android-vts-9.0_r13android-vts-9.0_r12android-vts-9.0_r11android-vts-9.0_r10android-p-preview-5android-p-preview-4android-cts-9.0_r9android-cts-9.0_r8android-cts-9.0_r7android-cts-9.0_r6android-cts-9.0_r5android-cts-9.0_r4android-cts-9.0_r3android-cts-9.0_r20android-cts-9.0_r2android-cts-9.0_r19android-cts-9.0_r18android-cts-9.0_r17android-cts-9.0_r16android-cts-9.0_r15android-cts-9.0_r14android-cts-9.0_r13android-cts-9.0_r12android-cts-9.0_r11android-cts-9.0_r10android-cts-9.0_r1android-9.0.0_r9android-9.0.0_r8android-9.0.0_r7android-9.0.0_r6android-9.0.0_r58android-9.0.0_r57android-9.0.0_r56android-9.0.0_r55android-9.0.0_r54android-9.0.0_r53android-9.0.0_r52android-9.0.0_r51android-9.0.0_r50android-9.0.0_r5android-9.0.0_r49android-9.0.0_r48android-9.0.0_r3android-9.0.0_r2android-9.0.0_r18android-9.0.0_r17android-9.0.0_r10android-9.0.0_r1security-pi-releasepie-vts-releasepie-s2-releasepie-release-2pie-releasepie-r2-s2-releasepie-r2-s1-releasepie-r2-releasepie-platform-releasepie-gsipie-cuttlefish-testingpie-cts-releasepie-arc
Change-Id: I37daa5f4452442119a1582626c183326281ed0ea
-rw-r--r-- | gptcl.cc | 10 | ||||
-rw-r--r-- | gptcl.h | 2 |
2 files changed, 6 insertions, 6 deletions
@@ -365,7 +365,10 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { partNum = newPartNum; if ((partNum >= 0) && (partNum < (int) GetNumParts())) { // Remember the original hex value requested - typeRaw[partNum] = GetString(typeCode, 2); + string raw = GetString(typeCode, 2); + if (raw.size() == 4) { + typeRaw[partNum] = StrToHex(raw, 0); + } typeHelper = GetString(typeCode, 2); if ((typeHelper != (GUIDData) "00000000-0000-0000-0000-000000000000") && (ChangePartType(partNum, typeHelper))) { @@ -499,10 +502,7 @@ int GPTDataCL::BuildMBR(char* argument, int isHybrid) { // If we were created with a specific hex type, use that instead // of risking fidelity loss by doing a GUID-based lookup if (typeRaw.count(origPartNum) == 1) { - string raw = typeRaw[origPartNum]; - if (raw.size() == 4) { - newPart.SetType(StrToHex(raw, 0)); - } + newPart.SetType(typeRaw[origPartNum]); } newMBR.AddPart(i + isHybrid, newPart); } else { @@ -37,7 +37,7 @@ class GPTDataCL : public GPTData { int alignment, deletePartNum, infoPartNum, largestPartNum, bsdPartNum; uint32_t tableSize; poptContext poptCon; - std::map<int, string> typeRaw; + std::map<int, char> typeRaw; int BuildMBR(char* argument, int isHybrid); public: |