OSDN Git Service

* labels/mac.c (_rawpart_is_boot): Check for Apple_Boot type.
authorDavid Cantrell <dcantrell@redhat.com>
Thu, 2 Nov 2006 23:35:31 +0000 (23:35 +0000)
committerDavid Cantrell <dcantrell@redhat.com>
Thu, 2 Nov 2006 23:35:31 +0000 (23:35 +0000)
   * 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

libparted/ChangeLog
libparted/labels/mac.c

index f7e5827..ebb3dd8 100644 (file)
@@ -1,3 +1,8 @@
+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).
index e118775..98f59be 100644 (file)
@@ -407,7 +407,13 @@ strncasestr (const char* haystack, const char* needle, int n)
 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
@@ -604,7 +610,8 @@ _rawpart_analyse (MacRawPartition* raw_part, PedDisk* disk, int num)
                                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,