diff options
author | emax <emax@FreeBSD.org> | 2011-04-19 16:21:57 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2011-04-19 16:21:57 +0000 |
commit | 79542a929deff2bec2296c282a7961f5ee1b8cd6 (patch) | |
tree | 42f7fdf9c72a9c39e560d2e55b0072d77f13cb7a /usr.sbin/bluetooth | |
parent | 830058933714d904d4f17fd73a72b0cbc425409e (diff) | |
download | FreeBSD-src-79542a929deff2bec2296c282a7961f5ee1b8cd6.zip FreeBSD-src-79542a929deff2bec2296c282a7961f5ee1b8cd6.tar.gz |
Improve the man page and l2control's usage() a bit.
Submitted by: arundel
MFC after: 1 week
Diffstat (limited to 'usr.sbin/bluetooth')
-rw-r--r-- | usr.sbin/bluetooth/l2control/l2control.8 | 26 | ||||
-rw-r--r-- | usr.sbin/bluetooth/l2control/l2control.c | 9 |
2 files changed, 22 insertions, 13 deletions
diff --git a/usr.sbin/bluetooth/l2control/l2control.8 b/usr.sbin/bluetooth/l2control/l2control.8 index 794b6a7..f294930 100644 --- a/usr.sbin/bluetooth/l2control/l2control.8 +++ b/usr.sbin/bluetooth/l2control/l2control.8 @@ -25,7 +25,7 @@ .\" $Id: l2control.8,v 1.5 2003/05/21 00:53:00 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd April 9, 2011 .Dt L2CONTROL 8 .Os .Sh NAME @@ -34,25 +34,27 @@ .Sh SYNOPSIS .Nm .Op Fl hn -.Fl a Ar BD_ADDR +.Fl a Ar local .Ar command .Op Ar parameters ... .Sh DESCRIPTION The .Nm -utility connects to the local device with the specified BD_ADDR and attempts -to send the specified command. +utility connects to the local device with the specified BD_ADDR or name +and attempts to send the specified command. The .Nm utility will print results to the standard output and error messages to -the standard error. +the standard error output. .Pp The options are as follows: .Bl -tag -width indent -.It Fl a Ar BD_ADDR -Connect to the local device with the specified BD_ADDR. +.It Fl a Ar local +Connect to the local device with the specified BD_ADDR or name. Example: -.Fl a Li 00:01:02:03:04:05 . +.Fl a Li 00:01:02:03:04:05 +or +.Fl a Li bt_device . .It Fl h Display usage message and exit. .It Fl n @@ -62,10 +64,10 @@ Normally attempts to resolve Bluetooth addresses, and display them symbolically. .It Ar command One of the supported commands (see below). -Special command +The special command .Cm help -can be used to obtain the list of all supported commands. -To get more information about specific command use +can be used to obtain a list of all supported commands. +To get more information about a specific command use .Cm help Ar command . .It Ar parameters One or more optional space separated command parameters. @@ -92,4 +94,4 @@ are: .Xr ng_l2cap 4 , .Xr l2ping 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq emax@FreeBSD.org diff --git a/usr.sbin/bluetooth/l2control/l2control.c b/usr.sbin/bluetooth/l2control/l2control.c index 585021c..fdbf2f5b 100644 --- a/usr.sbin/bluetooth/l2control/l2control.c +++ b/usr.sbin/bluetooth/l2control/l2control.c @@ -207,7 +207,14 @@ print_l2cap_command(struct l2cap_command *category) static void usage(void) { - fprintf(stdout, "Usage: l2control -a BD_ADDR [-n] [-h] cmd [p1] [..]]\n"); + fprintf(stderr, "Usage: l2control [-hn] -a local cmd [params ..]\n"); + fprintf(stderr, "Where:\n"); + fprintf(stderr, " -a local Specify local device to connect to\n"); + fprintf(stderr, " -h Display this message\n"); + fprintf(stderr, " -n Show addresses as numbers\n"); + fprintf(stderr, " cmd Supported command " \ + "(see l2control help)\n"); + fprintf(stderr, " params Optional command parameters\n"); exit(255); } /* usage */ |