diff options
author | deraadt <deraadt@openbsd.org> | 2005-11-16 16:40:28 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2005-11-16 16:40:28 +0000 |
commit | 2a642902e2170045b9214b24da5c5aed99f34e5a (patch) | |
tree | 1c778ac690f6dd99e1b6c518a16fc0cdebbf173e /usr.sbin/gpioctl | |
parent | sync (diff) | |
download | wireguard-openbsd-2a642902e2170045b9214b24da5c5aed99f34e5a.tar.xz wireguard-openbsd-2a642902e2170045b9214b24da5c5aed99f34e5a.zip |
no need for -h, any illegal option is fine
Diffstat (limited to 'usr.sbin/gpioctl')
-rw-r--r-- | usr.sbin/gpioctl/gpioctl.8 | 8 | ||||
-rw-r--r-- | usr.sbin/gpioctl/gpioctl.c | 10 |
2 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/gpioctl/gpioctl.8 b/usr.sbin/gpioctl/gpioctl.8 index d2bb5fa289a..dfefe85b4aa 100644 --- a/usr.sbin/gpioctl/gpioctl.8 +++ b/usr.sbin/gpioctl/gpioctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gpioctl.8,v 1.7 2005/11/16 12:44:49 jmc Exp $ +.\" $OpenBSD: gpioctl.8,v 1.8 2005/11/16 16:40:28 deraadt Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> .\" @@ -22,12 +22,12 @@ .Nd control GPIO devices .Sh SYNOPSIS .Nm gpioctl -.Op Fl hq +.Op Fl q .Op Fl d Ar device .Op Ar pin .Op Ar 0 | 1 | 2 .Nm gpioctl -.Op Fl hq +.Op Fl q .Op Fl d Ar device .Fl c .Ar pin @@ -135,8 +135,6 @@ file can be specified with the option in order to access a particular .Tn GPIO device. -.It Fl h -Display a usage summary. .It Fl q Operate quietly i.e. nothing is printed to stdout. .El diff --git a/usr.sbin/gpioctl/gpioctl.c b/usr.sbin/gpioctl/gpioctl.c index c0b0afc1127..0e5250ef978 100644 --- a/usr.sbin/gpioctl/gpioctl.c +++ b/usr.sbin/gpioctl/gpioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpioctl.c,v 1.2 2004/08/08 00:05:09 deraadt Exp $ */ +/* $OpenBSD: gpioctl.c,v 1.3 2005/11/16 16:40:28 deraadt Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -65,7 +65,7 @@ main(int argc, char *argv[]) int do_ctl = 0; int pin = 0, value = 0; - while ((ch = getopt(argc, argv, "cd:hq")) != -1) + while ((ch = getopt(argc, argv, "cd:h")) != -1) switch (ch) { case 'c': do_ctl = 1; @@ -76,8 +76,6 @@ main(int argc, char *argv[]) case 'q': quiet = 1; break; - case 'h': - case '?': default: usage(); /* NOTREACHED */ @@ -222,9 +220,9 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s [-hq] [-d device] [pin] [0 | 1 | 2]\n", + fprintf(stderr, "usage: %s [-q] [-d device] [pin] [0 | 1 | 2]\n", __progname); - fprintf(stderr, " %s [-hq] [-d device] -c pin [flags]\n", + fprintf(stderr, " %s [-q] [-d device] -c pin [flags]\n", __progname); exit(1); |