On 32-bit devices we trigger SIGBUS by trying to copy around the
std::string, so parse it immediately to avoid trouble.
Test: manual with 32-bit binary
Bug: 73961200
Change-Id: I32028fd18a00f3a40d380145cb7a7874b758f5c4
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
Build sgdisk command line tool for use on Android devices. The
command line parsing is currently written using popt, which has been
deprecated for some time, and is replaced by GNOME's glib option
parser.
Instead of pulling in either of those dependencies, this change
adds a stub that implements just enough of popt to get things
working.
Change-Id: I619f8da2e413893b4ea015a5d9e48d42637e25c8