From: NeilBrown Date: Thu, 16 May 2013 03:24:07 +0000 (+1000) Subject: intel,ddf: don't require partitions when ignore_hw_compat is set. X-Git-Tag: mdadm-3.3-rc1~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b31df43682216d1c65813eae49ebdd8253db8907;p=thirdparty%2Fmdadm.git intel,ddf: don't require partitions when ignore_hw_compat is set. Partitions are a hw-compat issue. This allows e.g "--examine" to be used on image files. Signed-off-by: NeilBrown --- diff --git a/super-ddf.c b/super-ddf.c index ea8439b0..a78692c3 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -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; diff --git a/super-intel.c b/super-intel.c index 3f15b0f1..2cb28b04 100644 --- a/super-intel.c +++ b/super-intel.c @@ -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;