Don't silently map --re-add to --add
As --add can destroy important data on a disk, and --re-add is not suppose to, it is wrong to silently try --add if --re-add fails. So print a message and abort instead. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
b42f577a0d
commit
751fd6c093
6
Manage.c
6
Manage.c
|
@ -578,6 +578,12 @@ int Manage_subdevs(char *devname, int fd,
|
||||||
/* fall back on normal-add */
|
/* fall back on normal-add */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (dv->re_add) {
|
||||||
|
fprintf(stderr, Name
|
||||||
|
": --re-add for %s to %s is not possible\n",
|
||||||
|
dv->devname, devname);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* non-persistent. Must ensure that new drive
|
/* non-persistent. Must ensure that new drive
|
||||||
* is at least array.size big.
|
* is at least array.size big.
|
||||||
|
|
Loading…
Reference in New Issue