diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-01-31 21:32:28 -0600 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-01-31 21:32:31 -0600 |
commit | dbab42435071c74206f59b84062ccc030308aeb9 (patch) | |
tree | ad20b6b55f1913889464f9b948d2db1315a72d37 /emulator/main.c | |
parent | 24c2977006b397f25cadbc19144c76ca09f3aa68 (diff) | |
download | bluez-dbab42435071c74206f59b84062ccc030308aeb9.tar.gz |
emulator: Add command line options for selecting controller type to btvirt
Diffstat (limited to 'emulator/main.c')
-rw-r--r-- | emulator/main.c | 11 |
1 files 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"); } |