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>
This commit is contained in:
NeilBrown 2009-05-11 15:47:11 +10:00
parent 13a3b65d54
commit 60f8cb9b02
1 changed files with 1 additions and 1 deletions

View File

@ -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);