From c554cf15bb8445fd3afd7633e83a35b7dbd0084d Mon Sep 17 00:00:00 2001 From: Rod Smith Date: Wed, 19 Oct 2016 16:38:00 -0400 Subject: [PATCH] Added type codes for Android, ONIE, and QNX6. --- NEWS | 10 ++++++++++ parttypes.cc | 22 ++++++++++++++++++++++ support.h | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ab22049..ae1a46d 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,16 @@ 1.0.2 (?/??/2016): ------------------ +- Added two type codes for the Open Network Install Environment (ONIE): + 0xe100 (7412F7D5-A156-4B13-81DC-867174929325) and 0xe101 + (D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149). + +- Added thirteen type codes for Android partitions (0xa000 through + 0xa00c). + +- Added type code for QNX6 (aka QNX Power-Safe) filesystem: 0xb300, for + CEF5A9AD-73BC-4601-89F3-CDEEEEE321A1. + - Removed stray debug message ("REALLY setting name!") from sgdisk, when setting new name via -c option. diff --git a/parttypes.cc b/parttypes.cc index 175aca5..4207255 100644 --- a/parttypes.cc +++ b/parttypes.cc @@ -140,6 +140,21 @@ void PartType::AddAllTypes(void) { // Another Linux type code.... AddType(0x8e00, "E6D6D379-F507-44C2-A23C-238F2A3DF928", "Linux LVM"); + // Android type codes.... + AddType(0xa000, "2568845D-2332-4675-BC39-8FA5A4748D15", "Android bootloader"); + AddType(0xa001, "114EAFFE-1552-4022-B26E-9B053604CF84", "Android bootloader 2"); + AddType(0xa002, "49A4D17F-93A3-45C1-A0DE-F50B2EBE2599", "Android boot"); + AddType(0xa003, "4177C722-9E92-4AAB-8644-43502BFD5506", "Android recovery"); + AddType(0xa004, "EF32A33B-A409-486C-9141-9FFB711F6266", "Android misc"); + AddType(0xa005, "20AC26BE-20B7-11E3-84C5-6CFDB94711E9", "Android metadata"); + AddType(0xa006, "38F428E6-D326-425D-9140-6E0EA133647C", "Android system"); + AddType(0xa007, "A893EF21-E428-470A-9E55-0668FD91A2D9", "Android cache"); + AddType(0xa008, "DC76DDA9-5AC1-491C-AF42-A82591580C0D", "Android data"); + AddType(0xa009, "EBC597D0-2053-4B15-8B64-E0AAC75F4DB1", "Android persistent"); + AddType(0xa00a, "8F68CC74-C5E5-48DA-BE91-A0C8C15E9C80", "Android factory"); + AddType(0xa00b, "767941D0-2085-11E3-AD3B-6CFDB94711E9", "Android fastboot/tertiary"); + AddType(0xa00c, "AC6D7924-EB71-4DF8-B48D-E267B27148FF", "Android OEM"); + // FreeBSD partition types.... // Note: Rather than extract FreeBSD disklabel data, convert FreeBSD // partitions in-place, and let FreeBSD sort out the details.... @@ -183,6 +198,9 @@ void PartType::AddAllTypes(void) { AddType(0xaf04, "5265636F-7665-11AA-AA11-00306543ECAC", "AppleTV recovery"); AddType(0xaf05, "53746F72-6167-11AA-AA11-00306543ECAC", "Apple Core Storage"); + // QNX Power-Safe (QNX6) + AddType(0xb300, "CEF5A9AD-73BC-4601-89F3-CDEEEEE321A1", "QNX6 Power-Safe"); + // Acronis Secure Zone AddType(0xbc00, "0311FC50-01CA-4725-AD77-9ADBB20ACE98", "Acronis Secure Zone"); @@ -206,6 +224,10 @@ void PartType::AddAllTypes(void) { AddType(0xc001, "75894C1E-3AEB-11D3-B7C1-7B03A0000000", "HP-UX data"); AddType(0xc002, "E2A1E728-32E3-11D6-A682-7B03A0000000", "HP-UX service"); + // Open Network Install Environment (ONIE) partitions.... + AddType(0xe100, "7412F7D5-A156-4B13-81DC-867174929325", "ONIE boot"); + AddType(0xe101, "D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149", "ONIE config"); + // See http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec AddType(0xea00, "BC13C2FF-59E6-4262-A352-B275FD6F7172", "Freedesktop $BOOT"); diff --git a/support.h b/support.h index b888d92..078fef2 100644 --- a/support.h +++ b/support.h @@ -8,7 +8,7 @@ #ifndef __GPTSUPPORT #define __GPTSUPPORT -#define GPTFDISK_VERSION "1.0.1" +#define GPTFDISK_VERSION "1.0.1.1" #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64