summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-04-24 14:06:07 +0000
committerhselasky <hselasky@FreeBSD.org>2012-04-24 14:06:07 +0000
commit99e455a390b2e567195827a870d58efda8fb3d08 (patch)
tree7d90b1bc46162711a9a588803cda541178fd65fc /usr.sbin
parent35c58230e292775a694d189ff2b0bea2dcf6947d (diff)
downloadFreeBSD-src-99e455a390b2e567195827a870d58efda8fb3d08.zip
FreeBSD-src-99e455a390b2e567195827a870d58efda8fb3d08.tar.gz
Add missing and probably also mandatory -h option.
MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/usbdump/usbdump.83
-rw-r--r--usr.sbin/usbdump/usbdump.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/usbdump/usbdump.8 b/usr.sbin/usbdump/usbdump.8
index eec13b8..05ff3f9 100644
--- a/usr.sbin/usbdump/usbdump.8
+++ b/usr.sbin/usbdump/usbdump.8
@@ -40,6 +40,7 @@
.Op Fl w Ar file
.Op Fl f Ar filter
.Op Fl b Ar file
+.Op Fl h
.Sh DESCRIPTION
The
.Nm
@@ -79,6 +80,8 @@ If 128 is added to the endpoint number that means IN direction, else OUT directi
A device unit or endpoint value of -1 means ignore this field.
If no filters are specified, all packets are passed through using the default -1,-1 filter.
This option can be specified multiple times.
+.It Fl h
+This option displays a summary of the command line options.
.El
.Sh EXAMPLES
Capture the USB raw packets on usbus2:
diff --git a/usr.sbin/usbdump/usbdump.c b/usr.sbin/usbdump/usbdump.c
index c26d831..1e8d171 100644
--- a/usr.sbin/usbdump/usbdump.c
+++ b/usr.sbin/usbdump/usbdump.c
@@ -775,6 +775,7 @@ usage(void)
fprintf(stderr, FMT, "-v", "Increase the verbose level");
fprintf(stderr, FMT, "-b <file>", "Save raw version of all recorded data to file");
fprintf(stderr, FMT, "-w <file>", "Write the raw packets to file");
+ fprintf(stderr, FMT, "-h", "Display summary of command line options");
#undef FMT
exit(EX_USAGE);
}
@@ -797,7 +798,7 @@ main(int argc, char *argv[])
const char *optstring;
char *pp;
- optstring = "b:i:r:s:vw:f:";
+ optstring = "b:hi:r:s:vw:f:";
while ((o = getopt(argc, argv, optstring)) != -1) {
switch (o) {
case 'i':
OpenPOWER on IntegriCloud