diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2019-08-23 07:55:21 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2019-08-23 07:55:21 +0000 |
commit | 19a280da83bf8f96962a3336680e60c8b6511f27 (patch) | |
tree | b09e3a0cc70db98b8ea9705f41ba411325cd6f8d /usr.sbin | |
parent | 2a414d87a0dfb704808d683155353c10abb2b11d (diff) |
vmctl(8): fix wrong output when using 'vmctl stop'
Fix a wrong output when using 'vmctl stop' without any further arguments.
Patch from Caspar Schutijser, thanks!
ok deraadt
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vmctl/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c index 02086d08611..3eb89c9fe96 100644 --- a/usr.sbin/vmctl/main.c +++ b/usr.sbin/vmctl/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.57 2019/07/05 22:22:40 jmc Exp $ */ +/* $OpenBSD: main.c,v 1.58 2019/08/23 07:55:20 mlarkin Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -945,7 +945,10 @@ ctl_stop(struct parse_result *res, int argc, char *argv[]) argc -= optind; argv += optind; - if (argc > 1) + if (argc == 0) { + if (res->action != CMD_STOPALL) + ctl_usage(res->ctl); + } else if (argc > 1) ctl_usage(res->ctl); else if (argc == 1) ret = parse_vmid(res, argv[0], 0); |