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

[libvirt] [PATCH 4/6] Wire protocol and remote driver for virDomainGetControlInfo



---
 daemon/remote_generator.pl   |   20 ++++++++++++++------
 src/remote/remote_driver.c   |    1 +
 src/remote/remote_protocol.x |   14 +++++++++++++-
 src/remote_protocol-structs  |    9 +++++++++
 4 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
index 632972c..8881d6c 100755
--- a/daemon/remote_generator.pl
+++ b/daemon/remote_generator.pl
@@ -668,9 +668,13 @@ elsif ($opt_b) {
             my $struct_name = $call->{ProcName};
             $struct_name =~ s/Get//;
 
-            if ($call->{ProcName} eq "DomainGetBlockInfo") {
-                # SPECIAL: virDomainGetBlockInfo has flags parameter after
-                #          the struct parameter in its signature
+            if ($call->{ProcName} eq "DomainGetBlockInfo" ||
+                $call->{ProcName} eq "DomainGetControlInfo") {
+                # SPECIAL: virDomainGetBlockInfo and virDomainGetControlInfo
+                #          have flags parameter after the struct parameter in
+                #          its signature
+                # FIXME: this doesn't sound special at all; flags parameter is
+                #        almost always the last one; anything else is special
                 my $flags = pop(@args_list);
                 push(@args_list, "&tmp");
                 push(@args_list, $flags);
@@ -1203,9 +1207,13 @@ elsif ($opt_k) {
             my $struct_name = $call->{ProcName};
             $struct_name =~ s/Get//;
 
-            if ($call->{ProcName} eq "DomainGetBlockInfo") {
-                # SPECIAL: virDomainGetBlockInfo has flags parameter after
-                #          the struct parameter in its signature
+            if ($call->{ProcName} eq "DomainGetBlockInfo" ||
+                $call->{ProcName} eq "DomainGetControlInfo") {
+                # SPECIAL: virDomainGetBlockInfo and virDomainGetControlInfo
+                #          have flags parameter after the struct parameter in
+                #          its signature
+                # FIXME: this doesn't sound special at all; flags parameter is
+                #        almost always the last one; anything else is special
                 $last_arg = pop(@args_list);
             }
 
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 8335a1a..f1c6674 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -6251,6 +6251,7 @@ static virDriver remote_driver = {
     .domainGetBlkioParameters = remoteDomainGetBlkioParameters, /* 0.9.0 */
     .domainGetInfo = remoteDomainGetInfo, /* 0.3.0 */
     .domainGetState = remoteDomainGetState, /* 0.9.2 */
+    .domainGetControlInfo = remoteDomainGetControlInfo, /* 0.9.3 */
     .domainSave = remoteDomainSave, /* 0.3.0 */
     .domainRestore = remoteDomainRestore, /* 0.3.0 */
     .domainCoreDump = remoteDomainCoreDump, /* 0.3.0 */
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index c9b8cff..7e8ad6d 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -2035,6 +2035,17 @@ struct remote_domain_event_control_error_msg {
     remote_nonnull_domain dom;
 };
 
+struct remote_domain_get_control_info_args {
+    remote_nonnull_domain dom;
+    unsigned int flags;
+};
+
+struct remote_domain_get_control_info_ret {
+    unsigned int state;
+    unsigned int details;
+    unsigned hyper stateTime;
+};
+
 /*----- Protocol. -----*/
 
 /* Define the program number, protocol version and procedure numbers here. */
@@ -2297,7 +2308,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_GET_CONTROL_INFO = 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..18511be 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -1542,6 +1542,15 @@ struct remote_domain_migrate_confirm3_args {
 struct remote_domain_event_control_error_msg {
         remote_nonnull_domain      dom;
 };
+struct remote_domain_get_control_info_args {
+        remote_nonnull_domain      dom;
+        u_int                      flags;
+};
+struct remote_domain_get_control_info_ret {
+        u_int                      state;
+        u_int                      details;
+        uint64_t                   stateTime;
+};
 struct remote_message_header {
         u_int                      prog;
         u_int                      vers;
-- 
1.7.5.3


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