Hi,

Output of "vmctl stop" without patch:

$ vmctl stop
vmctl: invalid id: _=/usr/sbin/vmctl

With patch:

$ ./vmctl stop
usage:  vmctl [-v] stop [-fw] [id | -a]

Best regards,
Caspar Schutijser

Index: main.c
===================================================================
RCS file: /cvs/src/usr.sbin/vmctl/main.c,v
retrieving revision 1.57
diff -u -p -r1.57 main.c
--- main.c      5 Jul 2019 22:22:40 -0000       1.57
+++ main.c      21 Aug 2019 19:18:18 -0000
@@ -945,7 +945,10 @@ ctl_stop(struct parse_result *res, int a
        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);

Reply via email to