From e6536360bd4496cee1f1bf2dfb0b11f6bdbbfd4b Mon Sep 17 00:00:00 2001 From: "Roderick W. Smith" Date: Sun, 23 Sep 2012 21:29:10 +0200 Subject: add support for a new Linux-specific GPT partition type code * NEWS: Describe the new Linux-specific partition type code and the new msftres flag that can be used to override this type code, should it be necessary. * doc/parted.texi: Describe of the new msftres flag. * include/parted/disk.in.h [_PedPartitionFlag]: Add PED_PARTITION_MSFT_DATA. * libparted/disk.c: Add check for PED_PARTITION_MSFT_DATA, with return of "msftdata", to ped_partition_flag_get_name() * libparted/labels/gpt.c (PARTITION_LINUX_DATA_GUID): Define. [_GPTPartitionData]: New member, "int msftdata". (_parse_part_entry): Set the msftdata flag if and only if the PARTITION_BASIC_DATA_GUID type code is in use; (gpt_partition_new): Use the PARTITION_LINUX_DATA_GUID type as the default type code (gpt_partition_set_system): Set the PARTITION_BASIC_DATA_GUID type code on partitions on which the msftdata flag is set and set PARTITION_LINUX_DATA_GUID as the type by default. Clear the msftdata flag in most tests in gpt_partition_set_flag() (gpt_partition_set_flag): Add test for PED_PARTITION_MSFT_DATA, which sets msftdata and other flags appropriately (gpt_partition_get_flag): Add test for the PED_PARTITION_MSFT_DATA item that returns the status of the msftdata flag (gpt_partition_is_flag_available): Add test for PED_PARTITION_MSFT_DATA item to * tests/t0220-gpt-msftres.sh: Accommodate the fact that now, partition table listings include "msftdata" for file systems of type NTFS and FAT*. For more discussion and justification, see http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10456 --- include/parted/disk.in.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/parted/disk.in.h b/include/parted/disk.in.h index 9734edd..a34e11e 100644 --- a/include/parted/disk.in.h +++ b/include/parted/disk.in.h @@ -72,10 +72,11 @@ enum _PedPartitionFlag { PED_PARTITION_BIOS_GRUB=12, PED_PARTITION_APPLE_TV_RECOVERY=13, PED_PARTITION_DIAG=14, - PED_PARTITION_LEGACY_BOOT=15 + PED_PARTITION_LEGACY_BOOT=15, + PED_PARTITION_MSFT_DATA=16 }; #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT -#define PED_PARTITION_LAST_FLAG PED_PARTITION_LEGACY_BOOT +#define PED_PARTITION_LAST_FLAG PED_PARTITION_MSFT_DATA enum _PedDiskTypeFeature { PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */ -- cgit v1.2.1