diff options
author | NeilBrown <neilb@suse.de> | 2013-06-19 03:39:14 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-06-19 03:39:14 +0200 |
commit | e6dd89da86813679fae44e472ea470a943f133e2 (patch) | |
tree | d8450525b2b2eb4e15280c4c6a5a2034db213709 /mdadm.c | |
parent | Manage: split Manage_runstop into Manage_run and Manage_stop (diff) | |
download | mdadm-e6dd89da86813679fae44e472ea470a943f133e2.tar.xz mdadm-e6dd89da86813679fae44e472ea470a943f133e2.zip |
Manage: allow "--stop" on kernel names.
e.g.
mdadm --stop md4
This works even if udev has become confused or killed.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1803,7 +1803,13 @@ static int misc_list(struct mddev_dev *devlist, (dv == devlist && dv->next == NULL)); continue; } - mdfd = open_mddev(dv->devname, 1); + if (dv->devname[0] == '/') + mdfd = open_mddev(dv->devname, 1); + else { + mdfd = open_dev(dv->devname); + if (mdfd < 0) + pr_err("Cannot open %s\n", dv->devname); + } if (mdfd>=0) { switch(dv->disposition) { case 'R': |