From c5afc314e2c36d54bf78b0d0049995c0f2df821c Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 18 Sep 2008 16:03:05 +1000 Subject: 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. --- mapfile.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mapfile.c') 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); } -- cgit v1.2.1