* labels/mac.c (_rawpart_analyse): Don't check the data_region_length
against the part->geom.length for boot partitions.
git-svn-id: svn://svn.debian.org/svn/parted/upstream/trunk@880
2d424fd7-7fe2-0310-af74-
8bc65edeb173
+2006-11-02 David Cantrell <dcantrell@redhat.com>
+ * labels/mac.c (_rawpart_is_boot): Check for Apple_Boot type.
+ * labels/mac.c (_rawpart_analyse): Don't check the data_region_length
+ against the part->geom.length for boot partitions.
+
2006-10-31 David Cantrell <dcantrell@redhat.com>
* device.c (canonicalize_file_name): calloc should use sizeof(char)
instead of 1 (from Debarshi Ray).
static int
_rawpart_is_boot (MacRawPartition* raw_part)
{
- return !strcasecmp (raw_part->type, "Apple_Bootstrap");
+ if (!strcasecmp(raw_part->type, "Apple_Bootstrap"))
+ return 1;
+
+ if (!strcasecmp(raw_part->type, "Apple_Boot"))
+ return 1;
+
+ return 0;
}
static int
goto error_destroy_part;
}
} else {
- if (mac_part_data->data_region_length < part->geom.length) {
+ if (mac_part_data->data_region_length < part->geom.length &&
+ !mac_part_data->is_boot) {
if (ped_exception_throw (
PED_EXCEPTION_ERROR,
PED_EXCEPTION_IGNORE_CANCEL,