Prevent user from using --stop with ambiguous args
PATCH 1/1 Prevent user from using --stop with ambiguous args
From: Norbert Szulc <[email protected]>
When both --scan and device name is passed to --stop action, then is executed only for given device. Scan is ignored.
Block the operation when both --scan and device name are passed.
Signed-off-by Norbert Szulc <[email protected]>
Signed-off-by Mariusz Tkaczyk <[email protected]>
--- mdadm.c | 5 +++++ 1 file changed, 5 insertions(+)
mdadm.c +5 -0
@@ -2039,6 +2039,11 @@ static int misc_list(struct mddev_dev *devlist, rv |=Manage_run (dv->devname, mdfd, c);break ;case 'S' : +if (c->scan) { +pr_err ("--stop not meaningful with both a --scan assembly and a device name.\n" ); + rv |=1 ; +break ; + } rv |=Manage_stop (dv->devname, mdfd, c->verbose,0 );break ;case 'o' :
Signature · 1 line
2.26.2
Jes Sorensen
AppliedQuoted 5 lines · Mariusz Tkaczyk
From: Norbert Szulc <[email protected]>
When both --scan and device name is passed to --stop action, then is executed only for given device. Scan is ignored.
Quoted 7 lines
Block the operation when both --scan and device name are passed.
Signed-off-by Norbert Szulc <[email protected]>Signed-off-by Mariusz Tkaczyk <[email protected]>--- mdadm.c | 5 +++++ 1 file changed, 5 insertions(+)
Applied!
Thanks,
Jes