On 13 April 2012 20:16, Crístian Viana <via...@linux.vnet.ibm.com> wrote: > --- a/hw/usb/redirect.c > +++ b/hw/usb/redirect.c > @@ -141,8 +141,6 @@ static void usbredir_interrupt_packet(void *priv, > uint32_t id, > static int usbredir_handle_status(USBRedirDevice *dev, > int status, int actual_len); > > -#define VERSION "qemu usb-redir guest " QEMU_VERSION > - > /* > * Logging stuff > */ > @@ -792,6 +790,9 @@ static void usbredir_open_close_bh(void *opaque) > { > USBRedirDevice *dev = opaque; > uint32_t caps[USB_REDIR_CAPS_SIZE] = { 0, }; > + char version[32]; > + > + snprintf(version, 32, "qemu usb-redir guest %s", qemu_get_version());
Why 32 ? Also, does the usb-redir protocol version string really appear to the guest? > usbredir_device_disconnect(dev); > > @@ -826,7 +827,7 @@ static void usbredir_open_close_bh(void *opaque) > > usbredirparser_caps_set_cap(caps, > usb_redir_cap_connect_device_version); > usbredirparser_caps_set_cap(caps, usb_redir_cap_filter); > - usbredirparser_init(dev->parser, VERSION, caps, USB_REDIR_CAPS_SIZE, > 0); > + usbredirparser_init(dev->parser, version, caps, USB_REDIR_CAPS_SIZE, > 0); > usbredirparser_do_write(dev->parser); > } > } -- PMM