]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Examine.c
Add must_be_container helper.
[thirdparty/mdadm.git] / Examine.c
index 3c1e73f9c1516349bdef1d0ed8f64ecf02a0dccf..ffca9ca5f9d615721b68db3a9af0a1d2eda57788 100644 (file)
--- a/Examine.c
+++ b/Examine.c
@@ -76,11 +76,10 @@ int Examine(struct mddev_dev *devlist, int brief, int export, int scan,
                        err = 1;
                }
                else {
-                       unsigned long long size;
                        int container = 0;
                        if (forcest)
                                st = dup_super(forcest);
-                       else if (get_dev_size(fd, NULL, &size) == 0 || size == 0) {
+                       else if (must_be_container(fd)) {
                                /* might be a container */
                                st = super_by_fd(fd, NULL);
                                container = 1;