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

[libvirt] [PATCH v4 07/11] Remote driver



Signed-off-by: Jiri Denemark <jdenemar redhat com>
---
 src/remote/remote_driver.c |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index e7799bf..db481dd 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -7465,6 +7465,32 @@ done:
     return rv;
 }
 
+
+static int
+remoteCPUCompare(virConnectPtr conn, const char *xmlDesc)
+{
+    struct private_data *priv = conn->privateData;
+    remote_cpu_compare_args args;
+    remote_cpu_compare_ret ret;
+    int rv = VIR_CPU_COMPARE_ERROR;
+
+    remoteDriverLock(priv);
+
+    args.xml = (char *) xmlDesc;
+
+    memset(&ret, 0, sizeof (ret));
+    if (call(conn, priv, 0, REMOTE_PROC_CPU_COMPARE,
+             (xdrproc_t) xdr_remote_cpu_compare_args, (char *) &args,
+             (xdrproc_t) xdr_remote_cpu_compare_ret, (char *) &ret) == -1)
+        goto done;
+
+    rv = ret.result;
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+}
+
 /*----------------------------------------------------------------------*/
 
 
@@ -8830,7 +8856,7 @@ static virDriver remote_driver = {
     remoteIsSecure, /* isSecure */
     remoteDomainIsActive, /* domainIsActive */
     remoteDomainIsPersistent, /* domainIsPersistent */
-    NULL, /* cpuCompare */
+    remoteCPUCompare, /* cpuCompare */
 };
 
 static virNetworkDriver network_driver = {
-- 
1.6.5.7


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