aboutsummaryrefslogtreecommitdiff
path: root/gptcl.h
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2017-10-19 13:27:21 -0600
committerJeff Sharkey <jsharkey@android.com>2017-10-19 13:41:27 -0600
commitd6f72efe5dc2c5cd592e80ede5c7d94d2a3c41e3 (patch)
tree3c028b40d1689d84736f175f3bbf2fb54681c718 /gptcl.h
parent696d5fd62a9443ca26e41005f5a200e4d147e5bf (diff)
downloadgptfdisk-d6f72efe5dc2c5cd592e80ede5c7d94d2a3c41e3.tar.gz
Remember hex type to support MBR creation.
Before this patch, requesting a code like "0x0c00" would be flattened to "0x0700" because it was translated through the GUID type table. Callers creating MBR tables expect these codes to flow through without this fidelity loss. To support this, we stash away any provided hex type and return it instead of doing a lookup. Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest Bug: 63735902 Change-Id: If61407960c9ad1050e5f9031617d71d68f7820b4
Diffstat (limited to 'gptcl.h')
-rw-r--r--gptcl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gptcl.h b/gptcl.h
index 610ca5f..7484a49 100644
--- a/gptcl.h
+++ b/gptcl.h
@@ -24,6 +24,7 @@
#include "gpt.h"
#include <popt.h>
+#include <map>
using namespace std;
@@ -36,6 +37,7 @@ class GPTDataCL : public GPTData {
int alignment, deletePartNum, infoPartNum, largestPartNum, bsdPartNum;
uint32_t tableSize;
poptContext poptCon;
+ std::map<int, string> typeRaw;
int BuildMBR(char* argument, int isHybrid);
public: