summaryrefslogtreecommitdiffstats
path: root/mapfile.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-09-18 16:03:05 +1000
committerNeilBrown <neilb@suse.de>2008-09-18 16:03:05 +1000
commitc5afc314e2c36d54bf78b0d0049995c0f2df821c (patch)
treea154a2a3463b03b057f751b2592c7dfc81670c6f /mapfile.c
parent352452c3648f683d5ee60c62ab243c37af87ada1 (diff)
downloadmdadm-c5afc314e2c36d54bf78b0d0049995c0f2df821c.tar.gz
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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mapfile.c b/mapfile.c
index cf2ca2b..955a1f9 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -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);
}