qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/1 v3] Allow machines to configure the QEMU_VER


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/1 v3] Allow machines to configure the QEMU_VERSION that's exposed via hardware
Date: Sat, 14 Apr 2012 02:27:09 +0100

On 13 April 2012 20:16, Crístian Viana <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]