[libvirt] [PATCH 1/3] qemu: Add capability probing for 'imput-send-event' qmp command

Peter Krempa pkrempa at redhat.com
Wed Nov 12 09:52:41 UTC 2014


On 11/11/14 15:54, Martin Kletzander wrote:
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c | 3 +++
>  src/qemu/qemu_capabilities.h | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 74a3b24..9ada568 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -272,6 +272,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
>                "migrate-rdma",
>                "ivshmem",
>                "drive-iotune-max",
> +
> +              "input-send-event", /* 180 */
>      );
> 
> 
> @@ -1436,6 +1438,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
>      { "nbd-server-start", QEMU_CAPS_NBD_SERVER },
>      { "change-backing-file", QEMU_CAPS_CHANGE_BACKING_FILE },
>      { "rtc-reset-reinjection", QEMU_CAPS_RTC_RESET_REINJECTION },
> +    { "input-send-event", QEMU_CAPS_INPUT_EVENT },
>  };
> 
>  struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index ffe3494..b4c5390 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -219,6 +219,7 @@ typedef enum {
>      QEMU_CAPS_MIGRATE_RDMA       = 177, /* have rdma migration */
>      QEMU_CAPS_DEVICE_IVSHMEM     = 178, /* -device ivshmem */
>      QEMU_CAPS_DRIVE_IOTUNE_MAX   = 179, /* -drive bps_max= and friends */
> +    QEMU_CAPS_INPUT_EVENT        = 180, /* input-send-event qmp command */

<bikeshedding>

I'd add the word send here too, as this might clash with a possible
future addition of an event. As the enum value name is internal it can
be changed in the future though and the stable name string of the
capability is okay.

</bikeshedding>

> 
>      QEMU_CAPS_LAST,                   /* this must always be the last item */
>  } virQEMUCapsFlags;
> 

ACK,

Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141112/9ed1c7e7/attachment-0001.sig>


More information about the libvir-list mailing list