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

Re: [libvirt] [PATCH 08/10 V2] send-key: Implementing the remote protocol



On Tue, Jun 07, 2011 at 05:11:15PM +0800, Lai Jiangshan wrote:
> Signed-off-by: Lai Jiangshan <laijs cn fujitsu com>
> ---
>  src/remote/remote_driver.c   |    1 +
>  src/remote/remote_protocol.x |   16 +++++++++++++++-
>  src/remote_protocol-structs  |   11 +++++++++++
>  3 files changed, 27 insertions(+), 1 deletions(-)
> 
> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index 8335a1a..f08a609 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -6337,6 +6337,7 @@ static virDriver remote_driver = {
>      .domainMigratePerform3 = remoteDomainMigratePerform3, /* 0.9.2 */
>      .domainMigrateFinish3 = remoteDomainMigrateFinish3, /* 0.9.2 */
>      .domainMigrateConfirm3 = remoteDomainMigrateConfirm3, /* 0.9.2 */
> +    .domainSendKey = remoteDomainSendKey, /* 0.9.3 */
>  };
>  
>  static virNetworkDriver network_driver = {
> diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
> index c9b8cff..2126325 100644
> --- a/src/remote/remote_protocol.x
> +++ b/src/remote/remote_protocol.x
> @@ -191,6 +191,11 @@ const REMOTE_SECRET_UUID_LIST_MAX = 16384;
>   */
>  const REMOTE_CPU_BASELINE_MAX = 256;
>  
> +/*
> + * Max number of sending keycodes.
> + */
> +const REMOTE_SEND_KEY_MAX = 16;

Should call this  REMOTE_DOMAIN_SEND_KEY_MAX really

> +
>  /* UUID.  VIR_UUID_BUFLEN definition comes from libvirt.h */
>  typedef opaque remote_uuid[VIR_UUID_BUFLEN];
>  
> @@ -811,6 +816,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;
> +    unsigned int keycodes<REMOTE_SEND_KEY_MAX>;
> +    unsigned int flags;
> +};
> +
>  struct remote_domain_set_vcpus_args {
>      remote_nonnull_domain dom;
>      unsigned int nvcpus;
> @@ -2297,7 +2310,8 @@ enum remote_procedure {
>      REMOTE_PROC_INTERFACE_CHANGE_COMMIT = 221, /* autogen autogen */
>      REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK = 222, /* autogen autogen */
>      REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS = 223, /* skipgen autogen */
> -    REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224 /* skipgen skipgen */
> +    REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224, /* skipgen skipgen */
> +    REMOTE_PROC_DOMAIN_SEND_KEY = 225 /* autogen autogen */
>  
>      /*
>       * Notice how the entries are grouped in sets of 10 ?
> diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
> index 1d90dd5..dd70c24 100644
> --- a/src/remote_protocol-structs
> +++ b/src/remote_protocol-structs
> @@ -1550,3 +1550,14 @@ struct remote_message_header {
>          u_int                      serial;
>          remote_message_status      status;
>  };
> +
> +struct remote_domain_send_key_args {
> +    remote_nonnull_domain dom;
> +    unsigned int codeset;
> +    unsigned int holdtime;
> +    struct {
> +        unsigned int keycodes_len;
> +        unsigned int * keycodes_val;
> +    } keycodes;
> +    unsigned int flags;
> +};

ACK with the minor constant rename.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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