[libvirt] [PATCH 08/13] send-key: Implementing the remote protocol

Matthias Bolte matthias.bolte at googlemail.com
Wed May 25 19:50:50 UTC 2011


2011/5/25 Lai Jiangshan <laijs at cn.fujitsu.com>:
> Signed-off-by: Lai Jiangshan <laijs at fujitsu.com>
> ---
>  src/remote/remote_driver.c   |    1 +
>  src/remote/remote_protocol.x |   19 ++++++++++++++++++-
>  src/remote_protocol-structs  |   11 +++++++++++
>  3 files changed, 30 insertions(+), 1 deletions(-)
>
> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index 1691dab..6614250 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -6868,6 +6868,7 @@ static virDriver remote_driver = {
>     .domainMigrateFinish3 = remoteDomainMigrateFinish3, /* 0.9.2 */
>     .domainMigrateConfirm3 = remoteDomainMigrateConfirm3, /* 0.9.2 */
>     .domainSetSchedulerParametersFlags = remoteDomainSetSchedulerParametersFlags, /* 0.9.2 */
> +    .domainSendKey = remoteDomainSendKey, /* 0.9.2 */
>  };
>
>  static virNetworkDriver network_driver = {
> diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
> index f0da95d..61504c4 100644
> --- a/src/remote/remote_protocol.x
> +++ b/src/remote/remote_protocol.x
> @@ -191,6 +191,14 @@ const REMOTE_SECRET_UUID_LIST_MAX = 16384;
>  */
>  const REMOTE_CPU_BASELINE_MAX = 256;
>
> +/*
> + * Max number of sending keycodes.
> + */
> +const REMOTE_SEND_KEY_MAX = 16;
> +

Why such a low limit?

> +/* define dynamic array's base type for unsigned int */
> +typedef unsigned int u_int_DABT;
> +

No need for this typedef

>  /* UUID.  VIR_UUID_BUFLEN definition comes from libvirt.h */
>  typedef opaque remote_uuid[VIR_UUID_BUFLEN];
> @@ -838,6 +846,14 @@ struct remote_domain_inject_nmi_args {
>     unsigned int flags;
>  };
>
> +struct remote_domain_send_key_args {
> +    remote_nonnull_domain dom;
> +    unsigned int codeset;
> +    unsigned int holdtime;
> +    u_int_DABT keycodes<REMOTE_SEND_KEY_MAX>;
> +    unsigned int flags;
> +};
> +

As said in 4/13 there is no need for such an annotation. Here's a v2
that works in combination with my v2 for 4/13.

Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-send-key-Implementing-the-remote-protocol.patch
Type: text/x-patch
Size: 3085 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110525/d70566dc/attachment-0001.bin>


More information about the libvir-list mailing list