summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-07-09 17:14:16 +1000
committerNeilBrown <neilb@suse.de>2012-07-09 17:14:16 +1000
commitc8e1a230b73c44aff5beeeb74d32e36219bed12d (patch)
treea0b605d5bffe3e94ce6e7bbaeba033b3b3782229 /mdadm.c
parente7b84f9d5029338980d99d04b479ce814d4c4fcb (diff)
Remove re_add flag in favour of new disposition.
Instead of disposition == 'a' re_add == 1 use disposition == 'A' to record that a re-add was requested. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mdadm.c b/mdadm.c
index fa3da9fd..1ab8267a 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -117,7 +117,6 @@ int main(int argc, char *argv[])
int spare_sharing = 1;
struct supertype *ss = NULL;
int writemostly = 0;
- int re_add = 0;
char *shortopt = short_options;
int dosyslog = 0;
int rebuild_map = 0;
@@ -326,7 +325,6 @@ int main(int argc, char *argv[])
dv->devname = optarg;
dv->disposition = devmode;
dv->writemostly = writemostly;
- dv->re_add = re_add;
dv->used = 0;
dv->next = NULL;
*devlistend = dv;
@@ -382,7 +380,6 @@ int main(int argc, char *argv[])
dv->devname = optarg;
dv->disposition = devmode;
dv->writemostly = writemostly;
- dv->re_add = re_add;
dv->used = 0;
dv->next = NULL;
*devlistend = dv;
@@ -785,7 +782,7 @@ int main(int argc, char *argv[])
case O(MANAGE,'U'):
/* update=devicesize is allowed with --re-add */
- if (devmode != 'a' || re_add != 1) {
+ if (devmode != 'A') {
pr_err("--update in Manage mode only"
" allowed with --re-add.\n");
exit(1);
@@ -912,11 +909,9 @@ int main(int argc, char *argv[])
case O(MANAGE,'a'):
case O(MANAGE,Add): /* add a drive */
devmode = 'a';
- re_add = 0;
continue;
case O(MANAGE,ReAdd):
- devmode = 'a';
- re_add = 1;
+ devmode = 'A';
continue;
case O(MANAGE,'r'): /* remove a drive */
case O(MANAGE,Remove):