summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mapfile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mapfile.c b/mapfile.c
index ca7072e..f276232 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -294,9 +294,12 @@ void RebuildMap(void)
int mdp = get_mdp_major();
for (md = mdstat ; md ; md = md->next) {
- struct mdinfo *sra = sysfs_read(-1, md->devnum, GET_DEVS);
+ struct mdinfo *sra = sysfs_read(-1, md->devnum, GET_DEVS|SKIP_GONE_DEVS);
struct mdinfo *sd;
+ if (!sra)
+ continue;
+
for (sd = sra->devs ; sd ; sd = sd->next) {
char dn[30];
int dfd;