File fat16_hfs_fix.dif of Package parted

--- parted-1.6.22/libparted/labels/mac.c
+++ parted-1.6.22/libparted/labels/mac.c
@@ -444,7 +444,7 @@
 	return _rawpart_cmp_type (raw_part, "Apple_Void");
 }
 
-/* returns 1 if the raw_part represents a partition that is "unused space", or
+/* returns 0 if the raw_part represents a partition that is "unused space", or
  * doesn't represent a partition at all.  NOTE: some people make Apple_Free
  * partitions with MacOS, because they can't select another type.  So, if the
  * name is anything other than "Extra" or "", it is treated as a "real"
@@ -489,6 +489,13 @@
 	if (!part)
 		goto error;
 
+	/* Check for Apple_Free and set type to PED_PARTITION_FREESPACE */
+	if (_rawpart_cmp_type (raw_part, "Apple_Free")
+	    && (strcmp (raw_part->name, "Extra") == 0))
+		part->type = PED_PARTITION_FREESPACE;
+	else
+		part->type = PED_PARTITION_NORMAL;
+
 	mac_part_data = part->disk_specific;
 
 	strncpy (mac_part_data->volume_name, raw_part->name, 32);
--- parted-1.6.22/libparted/fs/fat/calc.c
+++ parted-1.6.22/libparted/fs/fat/calc.c
@@ -26,7 +26,7 @@
 fat_min_cluster_size (FatType fat_type) {
 	switch (fat_type) {
 		case FAT_TYPE_FAT12: return 1;
-		case FAT_TYPE_FAT16: return 1024/512;
+		case FAT_TYPE_FAT16: return 1; // in KByte
 		case FAT_TYPE_FAT32: return 4096/512;
 	}
 	return 0;
@@ -62,7 +62,7 @@
 fat_max_cluster_size (FatType fat_type) {
 	switch (fat_type) {
 		case FAT_TYPE_FAT12: return 1;	/* dunno... who cares? */
-		case FAT_TYPE_FAT16: return 32768/512;
+		case FAT_TYPE_FAT16: return 32768/1024; // = 32 
 		case FAT_TYPE_FAT32: return 65536/512;
 	}
 	return 0;
@@ -74,7 +74,7 @@
 	switch (fat_type) {
 		case FAT_TYPE_FAT12:
 		case FAT_TYPE_FAT16:
-			return fat_max_cluster_count (fat_type) / 2;
+			return 1024; // http://members.tripod.com/~averstak/fatdox/bootsec.htm
 
 		case FAT_TYPE_FAT32: return 0xfff0;
 	}
--- parted-1.6.22/libparted/fs/fat/fat.c
+++ parted-1.6.22/libparted/fs/fat/fat.c
@@ -763,8 +763,8 @@
 	if (!min_size)
 		return NULL;
 #else
-	min_size = 65794;
-	max_size = 2097153;
+	min_size = 4096; // http://members.tripod.com/~averstak/fatdox/bootsec.htm
+	max_size = 2097153; // 32 KByte je Cluster (2^16)
 #endif
 
 	return ped_constraint_new (
openSUSE Build Service is sponsored by