diff options
author | NeilBrown <neilb@suse.de> | 2009-11-17 13:15:34 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-11-17 13:15:34 +1100 |
commit | 751fd6c093815e10b2e0d56a920d8ee09ac01c58 (patch) | |
tree | 65b5c8efc7a972028255b879f588f44381f1c552 /Manage.c | |
parent | b42f577a0dbe0b232600478f4a5068b2f63a2684 (diff) | |
download | mdadm-751fd6c093815e10b2e0d56a920d8ee09ac01c58.tar.gz mdadm-751fd6c093815e10b2e0d56a920d8ee09ac01c58.tar.xz mdadm-751fd6c093815e10b2e0d56a920d8ee09ac01c58.zip |
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>
Diffstat (limited to 'Manage.c')
-rw-r--r-- | Manage.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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. |