[PATCH 1/2] gpt: don't use msftres flag for FAT/NTFS partitions

Keshav P R skodabenz at rocketmail.com
Fri Sep 18 11:07:51 UTC 2009


This patch corrects the bug in parted due to which any FAT(12,16,32)
or NTFS partition(s) is, by default, incorrectly set as "Microsoft
Reserved Partition" type in GPT disks.  With this change, parted
defaults to setting the FAT/NTFS Partitions partition type to
Linux/Windows Basic Data Partition which will make them accessible
in Mac OS X and Windows.

Reported by hramrach at centrum.cz in <http://bugs.debian.org/441033>,
with suggested change by Osamu Aoki <osamu at debian.org>.
Keshav P R <skodabenz at rocketmail.com> wrote the above and prepared
this patch.
---
 libparted/labels/gpt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index a4f0117..cc9bcdc 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -1286,7 +1286,7 @@ gpt_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type)
 	if (fs_type) {
 		if (strncmp (fs_type->name, "fat", 3) == 0
 		    || strcmp (fs_type->name, "ntfs") == 0) {
-			gpt_part_data->type = PARTITION_MSFT_RESERVED_GUID;
+			gpt_part_data->type = PARTITION_BASIC_DATA_GUID;
 			return 1;
 		}
 		if (strncmp (fs_type->name, "hfs", 3) == 0) {
--
1.6.5.rc2.177.ga9dd6




More information about the parted-devel mailing list