summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-07-21 22:27:12 +0200
committerEduardo Habkost <ehabkost@redhat.com>2009-07-29 11:43:31 -0300
commitb9484c255a1252e56b1a8332a1c6572635cca393 (patch)
tree4d892d9365755ca05587635d6b5b681d75bb4678
parentde9495191a1b554425307cae41e013f410a850fb (diff)
add option to disable usb net
Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <16a6da09d336f7e74039a87e5fcaf6b0dbcea80b.1248207932.git.quintela@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 512837 Message-Id: <a42c9417d705ba051ebfa907a8c7a6311300c9dd.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: Luiz Capitulino <lcapitulino@redhat.com> (conditional on feature unwanted)
-rw-r--r--qemu/Makefile2
-rwxr-xr-xqemu/configure8
-rw-r--r--qemu/vl.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/qemu/Makefile b/qemu/Makefile
index 9edf4614..acf0914c 100644
--- a/qemu/Makefile
+++ b/qemu/Makefile
@@ -93,7 +93,9 @@ endif
ifdef CONFIG_USB_SERIAL
OBJS+=usb-serial.o
endif
+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+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
diff --git a/qemu/configure b/qemu/configure
index 169ffeaf..353a3e7c 100755
--- a/qemu/configure
+++ b/qemu/configure
@@ -180,6 +180,7 @@ isapc="yes"
usb_msd="yes"
usb_wacom="yes"
usb_serial="yes"
+usb_net="yes"
kvm="yes"
kvm_nested="no"
kvm_cap_pit="no"
@@ -428,6 +429,8 @@ for opt do
;;
--disable-usb-serial) usb_serial="no"
;;
+ --disable-usb-net) usb_net="no"
+ ;;
--disable-kvm) kvm="no"
;;
--enable-profiler) profiler="yes"
@@ -1322,6 +1325,7 @@ echo "KVM nested $kvm_nested"
echo "USB storage $usb_msd"
echo "USB wacom $usb_wacom"
echo "USB serial $usb_serial"
+echo "USB net $usb_net"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1633,6 +1637,10 @@ if test "$usb_serial" = "yes" ; then
echo "CONFIG_USB_SERIAL=yes" >> $config_mak
echo "#define CONFIG_USB_SERIAL 1" >> $config_h
fi
+if test "$usb_net" = "yes" ; then
+ echo "CONFIG_USB_NET=yes" >> $config_mak
+ echo "#define CONFIG_USB_NET 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 53f35a33..6107066e 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -2822,6 +2822,7 @@ static int usb_device_add(const char *devname)
dev = usb_baum_init();
} else
#endif
+#ifdef CONFIG_USB_NET
if (strstart(devname, "net:", &p)) {
int nic = nb_nics;
@@ -2829,7 +2830,9 @@ static int usb_device_add(const char *devname)
return -1;
nd_table[nic].model = "usb";
dev = usb_net_init(&nd_table[nic]);
- } else if (!strcmp(devname, "bt") || strstart(devname, "bt:", &p)) {
+ } else
+#endif
+ 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 {