diff options
author | NeilBrown <neilb@suse.de> | 2008-09-18 08:03:05 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-09-18 08:03:05 +0200 |
commit | c5afc314e2c36d54bf78b0d0049995c0f2df821c (patch) | |
tree | a154a2a3463b03b057f751b2592c7dfc81670c6f /mapfile.c | |
parent | Handle incremental assembly of containers. (diff) | |
download | mdadm-c5afc314e2c36d54bf78b0d0049995c0f2df821c.tar.xz mdadm-c5afc314e2c36d54bf78b0d0049995c0f2df821c.zip |
Lots of fixes to make incremental assembly of containers work.
So:
mdadm -I /dev/whatever
will (if appropriate) add whatever to a container, then start
any arrays inside the container.
Diffstat (limited to 'mapfile.c')
-rw-r--r-- | mapfile.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -117,10 +117,12 @@ void map_read(struct map_ent **melp) return; while (fgets(buf, sizeof(buf), f)) { - if (sscanf(buf, " md%1[p]%d %s %x:%x:%x:%x %200s", + if (sscanf(buf, " %3[mdp]%d %s %x:%x:%x:%x %200s", nam, &devnum, metadata, uuid, uuid+1, - uuid+2, uuid+3, path) == 9) { - if (nam[0] == 'p') + uuid+2, uuid+3, path) == 8) { + if (strncmp(nam, "md", 2) != 0) + continue; + if (nam[2] == 'p') devnum = -1 - devnum; map_add(melp, devnum, metadata, uuid, path); } |