summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-06-19 11:23:44 +1000
committerNeilBrown <neilb@suse.de>2013-06-19 11:23:44 +1000
commitfe7e0e64b096db44cfe23f6a03aaaf78e2427d8a (patch)
tree0312d7c1af74c17293d22e291238e69848a35ce8 /mdadm.c
parent8cde842b189368d7c27923497e5d6be9b35b241b (diff)
Manage: split Manage_runstop into Manage_run and Manage_stop
The two branches have virtually nothing in common, so it is simpler if they are separate. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/mdadm.c b/mdadm.c
index 928d880b..fe6c2fa8 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1301,8 +1301,10 @@ int main(int argc, char *argv[])
c.update, c.force);
if (!rv && c.readonly < 0)
rv = Manage_ro(devlist->devname, mdfd, c.readonly);
- if (!rv && c.runstop)
- rv = Manage_runstop(devlist->devname, mdfd, c.runstop, c.verbose, 0);
+ if (!rv && c.runstop > 0)
+ rv = Manage_run(devlist->devname, mdfd, c.verbose);
+ if (!rv && c.runstop < 0)
+ rv = Manage_stop(devlist->devname, mdfd, c.verbose, 0);
break;
case ASSEMBLE:
if (devs_found == 1 && ident.uuid_set == 0 &&
@@ -1727,7 +1729,7 @@ static int stop_scan(int verbose)
}
mdfd = open_mddev(name, 1);
if (mdfd >= 0) {
- if (Manage_runstop(name, mdfd, -1, verbose, !last))
+ if (Manage_stop(name, mdfd, verbose, !last))
err = 1;
else
progress = 1;
@@ -1805,9 +1807,9 @@ static int misc_list(struct mddev_dev *devlist,
if (mdfd>=0) {
switch(dv->disposition) {
case 'R':
- rv |= Manage_runstop(dv->devname, mdfd, 1, c->verbose, 0); break;
+ rv |= Manage_run(dv->devname, mdfd, c->verbose); break;
case 'S':
- rv |= Manage_runstop(dv->devname, mdfd, -1, c->verbose, 0); break;
+ rv |= Manage_stop(dv->devname, mdfd, c->verbose, 0); break;
case 'o':
rv |= Manage_ro(dv->devname, mdfd, 1); break;
case 'w':