From 41d566d35dbc0bead25e0aeabb1bccb0d4855dfa Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 20 Apr 2005 13:25:21 +0000 Subject: Use hci_devinfo() instead of the ioctl() --- test/bdaddr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test') 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 #include #include -#include #include #include @@ -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); -- cgit