]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
intel,ddf: don't require partitions when ignore_hw_compat is set.
authorNeilBrown <neilb@suse.de>
Thu, 16 May 2013 03:24:07 +0000 (13:24 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 16 May 2013 03:24:07 +0000 (13:24 +1000)
Partitions are a hw-compat issue.

This allows e.g "--examine" to be used on image files.

Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c
super-intel.c

index ea8439b04eb78808b12f8809a70a2310c292ad18..a78692c3995616e105024864a769aab402049f60 100644 (file)
@@ -846,7 +846,7 @@ static int load_super_ddf(struct supertype *st, int fd,
        if (get_dev_size(fd, devname, &dsize) == 0)
                return 1;
 
-       if (test_partition(fd))
+       if (!st->ignore_hw_compat && test_partition(fd))
                /* DDF is not allowed on partitions */
                return 1;
 
index 3f15b0f1d19af0372654d6e12909f83894442ec1..2cb28b04b2dcf621611666d9b3fb0bc5b41a1ba8 100644 (file)
@@ -4381,7 +4381,7 @@ static int load_super_imsm(struct supertype *st, int fd, char *devname)
        struct intel_super *super;
        int rv;
 
-       if (test_partition(fd))
+       if (!st->ignore_hw_compat && test_partition(fd))
                /* IMSM not allowed on partitions */
                return 1;