diff options
| author | CrÃstian Viana <vianac@linux.vnet.ibm.com> | 2012-05-30 00:35:51 -0300 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-06-19 13:36:56 -0500 |
| commit | 93bfef4c6e4b23caea9d51e1099d06433d8835a4 (patch) | |
| tree | 89ede1eb2d2c290b991c7e54068ca8f37d594bbd /hw/usb/redirect.c | |
| parent | 459ae5ea5ad682c2b3220beb244d4102c1a4e332 (diff) | |
| download | focaccia-qemu-93bfef4c6e4b23caea9d51e1099d06433d8835a4.tar.gz focaccia-qemu-93bfef4c6e4b23caea9d51e1099d06433d8835a4.zip | |
Allow machines to configure the QEMU_VERSION that's exposed via hardware
QEMU exposes its version to the guest's hardware and in some cases that is wrong (e.g. Windows prints messages about driver updates when you switch the QEMU version). There is a new field now on the struct QEmuMachine, hw_version, which may contain the version that the specific machine should report. If that field is set, then that machine will report that version to the guest. Signed-off-by: CrÃstian Viana <vianac@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/usb/redirect.c')
| -rw-r--r-- | hw/usb/redirect.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 51c27b4051..d949f040d5 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -143,8 +143,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 */ @@ -794,6 +792,10 @@ static void usbredir_open_close_bh(void *opaque) { USBRedirDevice *dev = opaque; uint32_t caps[USB_REDIR_CAPS_SIZE] = { 0, }; + char version[32]; + + strcpy(version, "qemu usb-redir guest "); + pstrcat(version, sizeof(version), qemu_get_version()); usbredir_device_disconnect(dev); @@ -828,7 +830,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); } } |