summaryrefslogtreecommitdiff
path: root/mapfile.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-11 15:47:11 +1000
committerNeilBrown <neilb@suse.de>2009-05-11 15:47:11 +1000
commit60f8cb9b02af3c55708c44b40425f57282c8937c (patch)
treecdbfd439ce230007a767afaa4357351eead72cc7 /mapfile.c
parent13a3b65d5432ee941b9617670a79ef38363ccc7d (diff)
downloadmdadm-60f8cb9b02af3c55708c44b40425f57282c8937c.tar.gz
mapfile - Fix off-by-one error in RebuildMap
"mdadm -Ir" would get the path for md0 wrong because it went looking for mdp(-1) by mistake. Signed-off-by NeilBrown <neilb@suse.de>
Diffstat (limited to 'mapfile.c')
-rw-r--r--mapfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mapfile.c b/mapfile.c
index 3a26c6d..112d385 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -331,7 +331,7 @@ void RebuildMap(void)
if (ok != 0)
continue;
st->ss->getinfo_super(st, &info);
- if (md->devnum > 0)
+ if (md->devnum >= 0)
path = map_dev(MD_MAJOR, md->devnum, 0);
else
path = map_dev(mdp, (-1-md->devnum)<< 6, 0);