From 170f3c74102daa13fcc157e59b8f2a81b6a59764 Mon Sep 17 00:00:00 2001 From: Juan Quintela <quintela@redhat.com> Date: Tue, 21 Jul 2009 22:27:13 +0200 Subject: [PATCH 09/16] add option to disable usb bluez Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <e4bd75dc78bb8c1a0a8beaed6083687f6576494d.1248207932.git.quintela@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 512837 Message-Id: <7a1311844a4e4670d63677401e20a7230508d3d4.1248095798.git.quintela@redhat.com> Acked-by: "Daniel P. Berrange" <berrange@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> RH-Upstream-status: pending Acked-by: Dor Laor <dlaor@redhat.com> --- qemu/Makefile | 5 ++++- qemu/configure | 8 ++++++++ qemu/vl.c | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/qemu/Makefile b/qemu/Makefile index acf0914..6f20366 100644 --- a/qemu/Makefile +++ b/qemu/Makefile @@ -97,7 +97,10 @@ ifdef CONFIG_USB_NET OBJS+=usb-net.o endif OBJS+=sd.o ssi-sd.o -OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o +OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o +ifdef CONFIG_USB_BLUEZ +OBJS+=usb-net.o +endif OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o diff --git a/qemu/configure b/qemu/configure index 353a3e7..a69a04b 100755 --- a/qemu/configure +++ b/qemu/configure @@ -181,6 +181,7 @@ usb_msd="yes" usb_wacom="yes" usb_serial="yes" usb_net="yes" +usb_bluez="yes" kvm="yes" kvm_nested="no" kvm_cap_pit="no" @@ -431,6 +432,8 @@ for opt do ;; --disable-usb-net) usb_net="no" ;; + --disable-usb-bluez) usb_bluez="no" + ;; --disable-kvm) kvm="no" ;; --enable-profiler) profiler="yes" @@ -1326,6 +1329,7 @@ echo "USB storage $usb_msd" echo "USB wacom $usb_wacom" echo "USB serial $usb_serial" echo "USB net $usb_net" +echo "USB bluez $usb_bluez" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -1641,6 +1645,10 @@ if test "$usb_net" = "yes" ; then echo "CONFIG_USB_NET=yes" >> $config_mak echo "#define CONFIG_USB_NET 1" >> $config_h fi +if test "$usb_bluez" = "yes" ; then + echo "CONFIG_USB_BLUEZ=yes" >> $config_mak + echo "#define CONFIG_USB_BLUEZ 1" >> $config_h +fi if test "$aio" = "yes" ; then echo "#define CONFIG_AIO 1" >> $config_h echo "CONFIG_AIO=yes" >> $config_mak diff --git a/qemu/vl.c b/qemu/vl.c index 6107066..d3733f6 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -2832,10 +2832,13 @@ static int usb_device_add(const char *devname) dev = usb_net_init(&nd_table[nic]); } else #endif +#ifdef CONFIG_USB_BLUEZ if (!strcmp(devname, "bt") || strstart(devname, "bt:", &p)) { dev = usb_bt_init(devname[2] ? hci_init(p) : bt_new_hci(qemu_find_bt_vlan(0))); - } else { + } else +#endif + { return -1; } if (!dev) -- 1.6.3.rc4.29.g8146