aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-serial.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2017-05-30 14:15:09 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2017-05-30 14:15:10 +0100
commit697e42dec86d9ae706d4ed42c71acb5f35a463c8 (patch)
tree9a07c0d1490c761bb0165b2d0d1f4206b7870c49 /hw/usb/dev-serial.c
parenta3203e7dd375d4f619b72b854fcb6d3f2d14bfef (diff)
parent3bfecee2cb71f21cd39d6183f18b446c01917573 (diff)
downloadqemu-697e42dec86d9ae706d4ed42c71acb5f35a463c8.zip
qemu-697e42dec86d9ae706d4ed42c71acb5f35a463c8.tar.gz
qemu-697e42dec86d9ae706d4ed42c71acb5f35a463c8.tar.bz2
Merge remote-tracking branch 'kraxel/tags/pull-usb-20170529-1' into staging
usb: depricate legacy options and hmp commands usb: fixes for ehci and hub, split xhci variants # gpg: Signature made Mon 29 May 2017 02:07:17 PM BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * kraxel/tags/pull-usb-20170529-1: ehci: fix frame timer invocation. usb: don't wakeup during coldplug usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up xhci: add CONFIG_USB_XHCI_NEC option xhci: split into multiple files usb: Simplify the parameter parsing of the legacy usb serial device usb: Deprecate HMP commands usb_add and usb_del usb: Deprecate the legacy -usbdevice option ehci: fix overflow in frame timer code Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/usb/dev-serial.c')
-rw-r--r--hw/usb/dev-serial.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 83a4f0e..76ceca1 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -516,27 +516,16 @@ static USBDevice *usb_serial_init(USBBus *bus, const char *filename)
char label[32];
static int index;
- while (*filename && *filename != ':') {
- const char *p;
-
- if (strstart(filename, "vendorid=", &p)) {
- error_report("vendorid is not supported anymore");
- return NULL;
- } else if (strstart(filename, "productid=", &p)) {
- error_report("productid is not supported anymore");
- return NULL;
- } else {
- error_report("unrecognized serial USB option %s", filename);
- return NULL;
- }
- while(*filename == ',')
- filename++;
+ if (*filename == ':') {
+ filename++;
+ } else if (*filename) {
+ error_report("unrecognized serial USB option %s", filename);
+ return NULL;
}
if (!*filename) {
error_report("character device specification needed");
return NULL;
}
- filename++;
snprintf(label, sizeof(label), "usbserial%d", index++);
cdrv = qemu_chr_new(label, filename);