]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - sysfs.c
When resync finished, report the mismatch count if there is one.
[thirdparty/mdadm.git] / sysfs.c
diff --git a/sysfs.c b/sysfs.c
index 166481f1a54580f652d191a932251dfbfa4190bd..25ede6b7b054fe6754353400ae4590bc34fb1cbe 100644 (file)
--- a/sysfs.c
+++ b/sysfs.c
@@ -113,6 +113,12 @@ struct sysarray *sysfs_read(int fd, int devnum, unsigned long options)
                        goto abort;
                sra->cache_size = strtoul(buf, NULL, 0);
        }
+       if (options & GET_MISMATCH) {
+               strcpy(base, "mismatch_cnt");
+               if (load_sys(fname, buf))
+                       goto abort;
+               sra->mismatch_cnt = strtoul(buf, NULL, 0);
+       }
 
        if (! (options & GET_DEVS))
                return sra;