summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-04-20 13:25:21 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-04-20 13:25:21 +0000
commit41d566d35dbc0bead25e0aeabb1bccb0d4855dfa (patch)
tree051b1cd916b6d1bb19c877d5a19f5c759944b94b
parent303a8bfd8c49de19c482b047c9a95b94e585c1cb (diff)
Use hci_devinfo() instead of the ioctl()
-rw-r--r--test/bdaddr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/bdaddr.c b/test/bdaddr.c
index d674c3de..2e2af6c7 100644
--- a/test/bdaddr.c
+++ b/test/bdaddr.c
@@ -34,7 +34,6 @@
#include <errno.h>
#include <stdlib.h>
#include <getopt.h>
-#include <sys/ioctl.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
@@ -151,7 +150,7 @@ static void usage(void)
static struct option main_options[] = {
{ "help", 0, 0, 'h' },
{ "device", 1, 0, 'i' },
- { 0, 0, 0, 0}
+ { 0, 0, 0, 0 }
};
int main(int argc, char *argv[])
@@ -192,8 +191,7 @@ int main(int argc, char *argv[])
exit(1);
}
- di.dev_id = dev;
- if (ioctl(dd, HCIGETDEVINFO, (void *) &di) < 0) {
+ if (hci_devinfo(dev, &di) < 0) {
fprintf(stderr, "Can't get device info for hci%d: %s (%d)\n",
dev, strerror(errno), errno);
hci_close_dev(dd);