fix remove_devices()
Don't write to 'pe' if 'path' was not specified Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
92bd8f8d3f
commit
ef70b9f4ef
10
Manage.c
10
Manage.c
|
@ -150,10 +150,12 @@ static void remove_devices(int devnum, char *path)
|
|||
for (part = 0; part < 16; part++) {
|
||||
if (part) {
|
||||
sprintf(be, "p%d", part);
|
||||
if (isdigit(pe[-1]))
|
||||
sprintf(pe, "p%d", part);
|
||||
else
|
||||
sprintf(pe, "%d", part);
|
||||
if (path) {
|
||||
if (isdigit(pe[-1]))
|
||||
sprintf(pe, "p%d", part);
|
||||
else
|
||||
sprintf(pe, "%d", part);
|
||||
}
|
||||
}
|
||||
/* FIXME test if really is md device ?? */
|
||||
unlink(base);
|
||||
|
|
Loading…
Reference in New Issue