diff options
author | Juan Quintela <quintela@redhat.com> | 2009-07-21 22:27:11 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2009-07-29 11:43:31 -0300 |
commit | de9495191a1b554425307cae41e013f410a850fb (patch) | |
tree | 99c3d9ccb5455bb8fd1be8ae33d8ead9aebc6f0d | |
parent | 9c01d5aaaa9e38fd5cb8f7911cc9b220851a361c (diff) |
add option to disable usb serial
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <d5f2fb3889878133354dd78019be3998830e109e.1248207932.git.quintela@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Bugzilla: 512837
Obsoletes: <a542be03f85a8a9432c653c36cfe973b1608763b.1248095797.git.quintela@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com> (conditional on feature unwanted)
RH-Upstream-status: pending
Acked-by: "Daniel P. Berrange" <berrange@redhat.com>
-rw-r--r-- | qemu/Makefile | 5 | ||||
-rwxr-xr-x | qemu/configure | 9 | ||||
-rw-r--r-- | qemu/vl.c | 10 |
3 files changed, 20 insertions, 4 deletions
diff --git a/qemu/Makefile b/qemu/Makefile index 8fd84ad2..9edf4614 100644 --- a/qemu/Makefile +++ b/qemu/Makefile @@ -90,7 +90,10 @@ endif ifdef CONFIG_USB_WACOM OBJS+=usb-wacom.o endif -OBJS+=usb-serial.o usb-net.o +ifdef CONFIG_USB_SERIAL +OBJS+=usb-serial.o +endif +OBJS+=usb-net.o 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 9a19a532..169ffeaf 100755 --- a/qemu/configure +++ b/qemu/configure @@ -179,6 +179,7 @@ scsi="yes" isapc="yes" usb_msd="yes" usb_wacom="yes" +usb_serial="yes" kvm="yes" kvm_nested="no" kvm_cap_pit="no" @@ -425,6 +426,8 @@ for opt do ;; --disable-usb-wacom) usb_wacom="no" ;; + --disable-usb-serial) usb_serial="no" + ;; --disable-kvm) kvm="no" ;; --enable-profiler) profiler="yes" @@ -582,6 +585,7 @@ echo " --disable-scsi disable scsi devices" echo " --disable-isapc disable isapc machine" echo " --disable-usb-msd disable usb storage devices" echo " --disable-usb-wacom disable usb wacom tablets" +echo " --disable-usb-serial disable usb serial" echo " --disable-kvm disable KVM acceleration support" echo " --disable-nptl disable usermode NPTL support" echo " --enable-system enable all system emulation targets" @@ -1317,6 +1321,7 @@ echo "ISAPC support $isapc" echo "KVM nested $kvm_nested" echo "USB storage $usb_msd" echo "USB wacom $usb_wacom" +echo "USB serial $usb_serial" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -1624,6 +1629,10 @@ if test "$usb_wacom" = "yes" ; then echo "CONFIG_USB_WACOM=yes" >> $config_mak echo "#define CONFIG_USB_WACOM 1" >> $config_h fi +if test "$usb_serial" = "yes" ; then + echo "CONFIG_USB_SERIAL=yes" >> $config_mak + echo "#define CONFIG_USB_SERIAL 1" >> $config_h +fi if test "$aio" = "yes" ; then echo "#define CONFIG_AIO 1" >> $config_h echo "CONFIG_AIO=yes" >> $config_mak @@ -2812,13 +2812,17 @@ static int usb_device_add(const char *devname) dev = usb_wacom_init(); } else #endif - if (strstart(devname, "serial:", &p)) { +#ifdef CONFIG_USB_SERIAL + if (strstart(devname, "serial:", &p)) { dev = usb_serial_init(p); + } else +#endif #ifdef CONFIG_BRLAPI - } else if (!strcmp(devname, "braille")) { + if (!strcmp(devname, "braille")) { dev = usb_baum_init(); + } else #endif - } else if (strstart(devname, "net:", &p)) { + if (strstart(devname, "net:", &p)) { int nic = nb_nics; if (net_client_init("nic", p) < 0) |