]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Examine.c
imsm: add 'verify', 'verify with fixup', and 'general' migration types
[thirdparty/mdadm.git] / Examine.c
index 5de92028acd4c0bf971a859203bd363ca371ddae..3827e7ed08086bc740799524f82701bb49de7bd6 100644 (file)
--- a/Examine.c
+++ b/Examine.c
@@ -123,12 +123,13 @@ int Examine(mddev_dev_t devlist, int brief, int export, int scan,
                                st->ss->getinfo_super(st, &ap->info);
                                st->ss->free_super(st);
                        }
-                       if (!(ap->info.disk.state & MD_DISK_SYNC))
+                       if (!(ap->info.disk.state & (1<<MD_DISK_SYNC)))
                                ap->spares++;
                        d = dl_strdup(devlist->devname);
                        dl_add(ap->devs, d);
                } else if (export) {
-                       st->ss->export_examine_super(st);
+                       if (st->ss->export_examine_super)
+                               st->ss->export_examine_super(st);
                } else {
                        printf("%s:\n",devlist->devname);
                        st->ss->examine_super(st, homehost);