diff options
author | NeilBrown <neilb@suse.de> | 2008-10-30 09:34:04 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-10-30 09:34:04 +1100 |
commit | 2b4ca8f079335c1b3f345ec13da58699aaa0269d (patch) | |
tree | 290c0814ec02b3f81ff7148cc413c7ca6a55ef27 /util.c | |
parent | 43aaf431f66270080368d4b33378bd3dc0fa1c96 (diff) |
Fix --incremental assembly of partitions arrays.
If incremental assembly finds an array mentioned in mdadm.conf,
with a 'standard partitioned' name like /dev/md_d0 or /dev/md/d0,
it will not create a partitioned array like it should.
This is because it mishandled the 'devnum' returned by
is_standard.
That is a devnum that does not have the partition-or-not encoded
into it. So we need to check the actual return value of
is_standard and encode the partition-or-not info into the devnum.
Also fix a couple of comments.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -398,7 +398,7 @@ int is_standard(char *dev, int *nump) if (strncmp(d, "/d",2)==0) d += 2, type=1; /* /dev/md/dN{pM} */ else if (strncmp(d, "/md_d", 5)==0) - d += 5, type=1; /* /dev/md_dNpM */ + d += 5, type=1; /* /dev/md_dN{pM} */ else if (strncmp(d, "/md", 3)==0) d += 3, type=-1; /* /dev/mdN */ else if (d-dev > 3 && strncmp(d-2, "md/", 3)==0) |