]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - util.c
MISC: Add --examine-badblocks option
[thirdparty/mdadm.git] / util.c
diff --git a/util.c b/util.c
index 498162f0da4cf61c9e7854d8f8eb969222c30dfb..6c10365e80c99a39e55111af98b5ccc4e40c5296 100644 (file)
--- a/util.c
+++ b/util.c
@@ -559,8 +559,8 @@ int check_raid(int fd, char *name)
        char *level;
        struct supertype *st = guess_super(fd);
 
-       if (!st) return 0;
-       st->ignore_hw_compat = 1;
+       if (!st)
+               return 0;
        st->ss->load_super(st, fd, name);
        /* Looks like a raid array .. */
        pr_err("%s appears to be part of a raid array:\n",
@@ -1077,6 +1077,7 @@ struct supertype *dup_super(struct supertype *orig)
        st->ss = orig->ss;
        st->max_devs = orig->max_devs;
        st->minor_version = orig->minor_version;
+       st->ignore_hw_compat = orig->ignore_hw_compat;
        st->sb = NULL;
        st->info = NULL;
        return st;
@@ -1124,7 +1125,6 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
                rv = superlist[bestsuper]->load_super(st, fd, NULL);
                if (rv == 0) {
                        superlist[bestsuper]->free_super(st);
-                       st->ignore_hw_compat = 0;
                        return st;
                }
        }