Copy from home:puzel:staging/parted via accept of submit request 43317 revision 2. Request was accepted with message: OBS-URL: https://build.opensuse.org/request/show/43317 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=26
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
Index: parted-2.3/libparted/labels/mac.c
|
|
===================================================================
|
|
--- parted-2.3.orig/libparted/labels/mac.c 2010-07-08 13:29:24.000000000 +0200
|
|
+++ parted-2.3/libparted/labels/mac.c 2010-07-08 13:29:25.000000000 +0200
|
|
@@ -469,7 +469,7 @@ _rawpart_is_void (MacRawPartition* raw_p
|
|
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"
|
|
@@ -534,6 +534,13 @@ _rawpart_analyse (MacRawPartition* raw_p
|
|
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);
|