summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-11-28 04:29:40 +0000
committerkn <kn@cvs.openbsd.org>2019-11-28 04:29:40 +0000
commitc21c69945137b611b6b61423546504b07dd5af2e (patch)
tree9eaf2d4a533b400ccd8e1979bce384ff6709b402 /usr.sbin
parent5e65e15d8ea08212751f73682cf2f1d77dcb7b8c (diff)
Usage on excessive select, delete, download, start, stop, panic arguments
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldomctl/ldomctl.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr.sbin/ldomctl/ldomctl.c b/usr.sbin/ldomctl/ldomctl.c
index 81ef09f3e3e..0b58087e9a2 100644
--- a/usr.sbin/ldomctl/ldomctl.c
+++ b/usr.sbin/ldomctl/ldomctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldomctl.c,v 1.23 2019/11/27 19:54:10 kn Exp $ */
+/* $OpenBSD: ldomctl.c,v 1.24 2019/11/28 04:29:39 kn Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -285,6 +285,9 @@ list(int argc, char **argv)
struct ds_conn *dc;
struct mdstore_set *set;
+ if (argc != 1)
+ usage();
+
dc = ds_conn_open("/dev/spds", NULL);
mdstore_register(dc);
while (TAILQ_EMPTY(&mdstore_sets))
@@ -314,7 +317,7 @@ xselect(int argc, char **argv)
{
struct ds_conn *dc;
- if (argc < 2)
+ if (argc != 2)
usage();
dc = ds_conn_open("/dev/spds", NULL);
@@ -330,7 +333,7 @@ delete(int argc, char **argv)
{
struct ds_conn *dc;
- if (argc < 2)
+ if (argc != 2)
usage();
if (strcmp(argv[1], "factory-default") == 0)
@@ -349,7 +352,7 @@ download(int argc, char **argv)
{
struct ds_conn *dc;
- if (argc < 2)
+ if (argc != 2)
usage();
dc = ds_conn_open("/dev/spds", NULL);
@@ -366,7 +369,7 @@ guest_start(int argc, char **argv)
struct hvctl_msg msg;
ssize_t nbytes;
- if (argc < 2)
+ if (argc != 2)
usage();
/*
@@ -392,7 +395,7 @@ guest_stop(int argc, char **argv)
struct hvctl_msg msg;
ssize_t nbytes;
- if (argc < 2)
+ if (argc != 2)
usage();
/*
@@ -418,7 +421,7 @@ guest_panic(int argc, char **argv)
struct hvctl_msg msg;
ssize_t nbytes;
- if (argc < 2)
+ if (argc != 2)
usage();
/*