diff options
author | NeilBrown <neilb@suse.de> | 2009-05-11 07:47:11 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-05-11 07:47:11 +0200 |
commit | 60f8cb9b02af3c55708c44b40425f57282c8937c (patch) | |
tree | cdbfd439ce230007a767afaa4357351eead72cc7 /mapfile.c | |
parent | Fix printf compile warning. (diff) | |
download | mdadm-60f8cb9b02af3c55708c44b40425f57282c8937c.tar.xz mdadm-60f8cb9b02af3c55708c44b40425f57282c8937c.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |