Change 2c2deeb032 is reverted in this
merge. Because it conflicts with upstream option "move-main-table".
Change-Id: I2c1cb67a95139879333a430eb0e8b34f6b396c32
Some hardware (notably Raspberry PI) requires a small FAT partition be listed
as the first MBR partition to boot. At the moment hybrid MBR disks allowing
this can only be made using the interactive `gdisk` program by choosing `h`
from the recovery menu and answering `N` when asked:
```
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)?
```
This commit brings feature parity to `sgdisk` by changing `-h` to support an
optional final partition `EE` indicating that the GPT partition should be
listed last in the MBR instead of first.
**Examples**:
GPT first (current behaviour)
```shell
sgdisk -h 1:2 sdcard.img
```
GPT last
```shell
sgdisk -h 1:2:EE sdcard.img
```
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
This reverts commit 74b7490a22.
This change caused a regression in fugu usb formatting.
Bug: 35217931
Test: None
Change-Id: I50c73bde912a7c941e1d67d41bfab02042db88eb
Updates gpftdisk to the latest version 0.8.10 (ish) -> 1.0.1
The downstream patches should be uneffected.
Change-Id: I527678c0b24194f3947e360f0f38c45cfa3b0d1c
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