Commit Graph

7 Commits

Author SHA1 Message Date
Jeff Sharkey
9c50b5e176 Parse hex code immediately to avoid SIGBUS.
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
2018-03-27 13:19:51 -06:00
Jeff Sharkey
d6f72efe5d 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
2017-10-19 13:41:27 -06:00
Greg Hartman
08372d76dc Add host build rules for sgdisk
Change-Id: I204ff8f580c2336c2c9d39bba48596aaaaa6860a
2015-02-24 21:05:01 -08:00
Jeff Sharkey
873988ad03 Compile gptfdisk for Android.
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
2015-02-21 13:31:03 -08:00
Roderick W. Smith
e3ee733ff8 Removed 0x8302 type code, since the Red Hat parted developers have
decided against using it.
2013-09-24 12:56:11 -04:00
srs5694
d1b11e8305 Fixed bug in reading GPTs with encoded header sizes other than 92 bytes. 2011-09-18 21:12:28 -04:00
srs5694
3860cbe1ca New files in support of version 0.8.0 2011-09-10 20:29:53 -04:00