From dbab42435071c74206f59b84062ccc030308aeb9 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 31 Jan 2013 21:32:28 -0600 Subject: [PATCH] emulator: Add command line options for selecting controller type to btvirt --- emulator/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/emulator/main.c b/emulator/main.c index 536f265f4..a11fdd8a6 100644 --- a/emulator/main.c +++ b/emulator/main.c @@ -70,6 +70,7 @@ int main(int argc, char *argv[]) struct server *server4; struct server *server5; bool enable_vhci = false; + enum vhci_type vhci_type = VHCI_TYPE_BREDRLE; sigset_t mask; mainloop_init(); @@ -77,7 +78,7 @@ int main(int argc, char *argv[]) for (;;) { int opt; - opt = getopt_long(argc, argv, "lvh", main_options, NULL); + opt = getopt_long(argc, argv, "lLBvh", main_options, NULL); if (opt < 0) break; @@ -85,6 +86,12 @@ int main(int argc, char *argv[]) case 'l': enable_vhci = true; break; + case 'L': + vhci_type = VHCI_TYPE_LE; + break; + case 'B': + vhci_type = VHCI_TYPE_BREDR; + break; case 'v': printf("%s\n", VERSION); return EXIT_SUCCESS; @@ -105,7 +112,7 @@ int main(int argc, char *argv[]) printf("Bluetooth emulator ver %s\n", VERSION); if (enable_vhci) { - vhci = vhci_open(VHCI_TYPE_BREDRLE); + vhci = vhci_open(vhci_type); if (!vhci) fprintf(stderr, "Failed to open Virtual HCI device\n"); } -- 2.11.0