diff options
author | markus <markus@FreeBSD.org> | 2006-10-31 00:26:58 +0000 |
---|---|---|
committer | markus <markus@FreeBSD.org> | 2006-10-31 00:26:58 +0000 |
commit | 9de050b14219fc101cb65c4c6e28ae13ad01f933 (patch) | |
tree | 700b616a03840a422f67027044735641879d50fb /usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c | |
parent | b52ff25a92af3a61ed6bee93846ef9404da5678f (diff) | |
download | FreeBSD-src-9de050b14219fc101cb65c4c6e28ae13ad01f933.zip FreeBSD-src-9de050b14219fc101cb65c4c6e28ae13ad01f933.tar.gz |
- Add a 'verbose' switch -v
- Only dump items that are being used for padding when being verbose. This
brings bthidcontrol in line with the behaviour of usbhidctl(1).
- Update the manpage accordingly
Approved by: emax
Diffstat (limited to 'usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c')
-rw-r--r-- | usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c b/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c index 21539e3..900bda5 100644 --- a/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c +++ b/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c @@ -49,6 +49,8 @@ static void usage(void); int32_t hid_sdp_query(bdaddr_t const *local, bdaddr_t const *remote, int32_t *error); +uint32_t verbose = 0; + /* * bthidcontrol */ @@ -62,7 +64,7 @@ main(int argc, char *argv[]) hid_init(NULL); memcpy(&bdaddr, NG_HCI_BDADDR_ANY, sizeof(bdaddr)); - while ((opt = getopt(argc, argv, "a:c:H:h")) != -1) { + while ((opt = getopt(argc, argv, "a:c:H:hv")) != -1) { switch (opt) { case 'a': /* bdaddr */ if (!bt_aton(optarg, &bdaddr)) { @@ -83,6 +85,10 @@ main(int argc, char *argv[]) hids_file = optarg; break; + case 'v': /* verbose */ + verbose++; + break; + case 'h': default: usage(); @@ -202,6 +208,7 @@ usage(void) " -c file specify path to the bthidd config file\n" \ " -H file specify path to the bthidd HIDs file\n" \ " -h display usage and quit\n" \ +" -v be verbose\n" \ " command one of the supported commands\n"); exit(255); } /* usage */ |