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:
NeilBrown 2009-11-17 13:15:34 +11:00
parent b42f577a0d
commit 751fd6c093
1 changed files with 6 additions and 0 deletions

View File

@ -578,6 +578,12 @@ int Manage_subdevs(char *devname, int fd,
/* 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 {
/* non-persistent. Must ensure that new drive
* is at least array.size big.