summaryrefslogtreecommitdiff
path: root/usr.bin/usbhidctl
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-10-16 18:37:20 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-10-16 18:37:20 +0000
commit5db8084af5521f02e05dde580be2a096d1855763 (patch)
treebcf7e61fde8768fc2d428cdcd6127d7a5d0b2e69 /usr.bin/usbhidctl
parent5b9445db9c66c6853ce3faaad8509b8076f43717 (diff)
make -a the default when no other options besides the required
-f are used input from and ok sthen@, jmc@, deraadt@
Diffstat (limited to 'usr.bin/usbhidctl')
-rw-r--r--usr.bin/usbhidctl/usbhid.c7
-rw-r--r--usr.bin/usbhidctl/usbhidctl.111
2 files changed, 12 insertions, 6 deletions
diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c
index 60378d81f6d..896186d683b 100644
--- a/usr.bin/usbhidctl/usbhid.c
+++ b/usr.bin/usbhidctl/usbhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbhid.c,v 1.8 2008/06/26 05:42:21 ray Exp $ */
+/* $OpenBSD: usbhid.c,v 1.9 2008/10/16 18:37:19 jakemsr Exp $ */
/* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */
/*
@@ -752,7 +752,7 @@ usage(void)
{
extern char *__progname;
- fprintf(stderr, "Usage: %s -f device [-t table] [-lv] -a\n",
+ fprintf(stderr, "usage: %s -f device [-t table] [-alv]\n",
__progname);
fprintf(stderr, " %s -f device [-t table] [-v] -r\n",
__progname);
@@ -823,6 +823,9 @@ main(int argc, char **argv)
/* NOTREACHED */
}
+ if (argc == 0 && rflag == 0)
+ aflag = 1;
+
for (varnum = 0; varnum < (size_t)argc; varnum++) {
char const *name, *valuesep;
struct Susbvar *svar;
diff --git a/usr.bin/usbhidctl/usbhidctl.1 b/usr.bin/usbhidctl/usbhidctl.1
index 3b137de990b..171c35a6179 100644
--- a/usr.bin/usbhidctl/usbhidctl.1
+++ b/usr.bin/usbhidctl/usbhidctl.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: usbhidctl.1,v 1.11 2008/06/26 05:42:21 ray Exp $
+.\" $OpenBSD: usbhidctl.1,v 1.12 2008/10/16 18:37:19 jakemsr Exp $
.\" $NetBSD: usbhidctl.1,v 1.14 2001/12/28 17:49:32 augustss Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 26 2008 $
+.Dd $Mdocdate: October 16 2008 $
.Dt USBHIDCTL 1
.Os
.Sh NAME
@@ -38,8 +38,7 @@
.Nm
.Fl f Ar device
.Op Fl t Ar table
-.Op Fl lv
-.Fl a
+.Op Fl alv
.Nm
.Fl f Ar device
.Op Fl t Ar table
@@ -71,6 +70,10 @@ The options are as follows:
.It Fl a
Show all items and their current values.
This option fails if the device does not support the GET_REPORT command.
+This is the default, if no parameters other than
+.Fl f
+are given to
+.Nm .
.It Fl f Ar device
Specify a path name for the device to operate on.
If