2011/5/25 Lai Jiangshan <[email protected]>:
> Signed-off-by: Lai Jiangshan <[email protected]>
> ---
> 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
From a9f64a5e3fbff8e78cb70acab32ae5af40b8b50f Mon Sep 17 00:00:00 2001
From: Lai Jiangshan <[email protected]>
Date: Wed, 25 May 2011 17:37:50 +0800
Subject: [PATCH] send-key: Implementing the remote protocol
Signed-off-by: Lai Jiangshan <[email protected]>
---
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 c9af14a..4a47ef6 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -6637,6 +6637,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 f0b9cd5..9afa909 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;
+
/* UUID. VIR_UUID_BUFLEN definition comes from libvirt.h */
typedef opaque remote_uuid[VIR_UUID_BUFLEN];
@@ -845,6 +850,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;
@@ -2309,7 +2322,8 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 216, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 217, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 218, /* skipgen skipgen */
- REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219 /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219, /* skipgen skipgen */
+ REMOTE_PROC_DOMAIN_SEND_KEY = 220 /* autogen autogen */
/* Notice how the entries are grouped in sets of 10 ?
* Nice isn't it. Please keep it this way when adding more.
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index c0152cb..477b569 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -1557,3 +1557,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;
+};
--
1.7.0.4
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list