summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-03-01 12:47:37 +0000
committerkn <kn@cvs.openbsd.org>2019-03-01 12:47:37 +0000
commitd5f546657cf7df4d8877c96f4edbb133da0dffbc (patch)
tree76c7c90f1546ccead1410b1faee68439a7fffa12 /usr.sbin
parentfcf50d2d6b1d25933557b0bddd82d0aa2315add8 (diff)
Fix previous extra arguments commit
I blatantly missed the argc/argv adjustments after getopt(3), resulting in valid commands like `vmctl create a -s 1G' to fail. Noticed by ajacoutot the hard way. OK ajacoutot jca
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmctl/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c
index 521eeaa9fe5..600e2efe4bd 100644
--- a/usr.sbin/vmctl/main.c
+++ b/usr.sbin/vmctl/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.53 2019/03/01 10:34:14 kn Exp $ */
+/* $OpenBSD: main.c,v 1.54 2019/03/01 12:47:36 kn Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -598,6 +598,8 @@ ctl_create(struct parse_result *res, int argc, char *argv[])
/* NOTREACHED */
}
}
+ argc -= optind;
+ argv += optind;
if (argc > 0)
ctl_usage(res->ctl);
@@ -915,6 +917,8 @@ ctl_start(struct parse_result *res, int argc, char *argv[])
/* NOTREACHED */
}
}
+ argc -= optind;
+ argv += optind;
if (argc > 0)
ctl_usage(res->ctl);
@@ -959,6 +963,8 @@ ctl_stop(struct parse_result *res, int argc, char *argv[])
/* NOTREACHED */
}
}
+ argc -= optind;
+ argv += optind;
if (argc > 0)
ctl_usage(res->ctl);