]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - util.c
examine: allows to examine a disk metadata on non-metadata compliant systems
[thirdparty/mdadm.git] / util.c
diff --git a/util.c b/util.c
index 8e1b73717650cef31fc79cf0365c59a9a8946889..ef4406a13304cc3d08ca077b87f3a16a9bfe62ec 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1196,6 +1196,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
                if (guess_type == guess_partitions && ss->add_to_super != NULL)
                        continue;
                memset(st, 0, sizeof(*st));
+               st->ignore_hw_compat = 1;
                rv = ss->load_super(st, fd, NULL);
                if (rv == 0) {
                        struct mdinfo info;
@@ -1211,9 +1212,11 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
        if (bestsuper != -1) {
                int rv;
                memset(st, 0, sizeof(*st));
+               st->ignore_hw_compat = 1;
                rv = superlist[bestsuper]->load_super(st, fd, NULL);
                if (rv == 0) {
                        superlist[bestsuper]->free_super(st);
+                       st->ignore_hw_compat = 0;
                        return st;
                }
        }