From 9451cd9ad20e1dd3ddc353f23e6825835c4a80db Mon Sep 17 00:00:00 2001
From: Keshav P R <skodabenz@rocketmail.com>
Date: Fri, 11 Sep 2009 18:48:29 +0530
Subject: [PATCH] Corrected the use of msftres flag in case of FAT/NTFS partitions in a GPT disk

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. After applying this patch parted will default to setting the Partition type of FAT/NTFS Partitions as Linux/Windows Basic Data Partition which will make them accessible in Mac OS X and Windows.
---
 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 3afc369..ce0cc77 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -1283,7 +1283,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.3.2.1299.gee46c

