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

[libvirt] [PATCH 08/14] Server side dispatcher



Signed-off-by: Jiri Denemark <jdenemar redhat com>
---
 daemon/remote.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/daemon/remote.c b/daemon/remote.c
index 7a43046..77777a3 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -5226,6 +5226,48 @@ static int remoteDispatchIsSecure(struct qemud_server *server ATTRIBUTE_UNUSED,
 }
 
 
+static int
+remoteDispatchCpuCompare (struct qemud_server *server ATTRIBUTE_UNUSED,
+                          struct qemud_client *client ATTRIBUTE_UNUSED,
+                          virConnectPtr conn,
+                          remote_message_header *hdr ATTRIBUTE_UNUSED,
+                          remote_error *err,
+                          remote_cpu_compare_args *args,
+                          remote_cpu_compare_ret *ret)
+{
+    int result;
+
+    result = virConnectCompareCPU (conn, args->xml);
+    if (result == VIR_CPU_COMPARE_ERROR) {
+        remoteDispatchConnError (err, conn);
+        return -1;
+    }
+
+    ret->result = result;
+    return 0;
+}
+
+static int
+remoteDispatchGetHostCpu (struct qemud_server *server ATTRIBUTE_UNUSED,
+                          struct qemud_client *client ATTRIBUTE_UNUSED,
+                          virConnectPtr conn,
+                          remote_message_header *hdr ATTRIBUTE_UNUSED,
+                          remote_error *err,
+                          void *args ATTRIBUTE_UNUSED,
+                          remote_get_host_cpu_ret *ret)
+{
+    char *cpu;
+
+    cpu = virConnectGetHostCPU (conn);
+    if (cpu == NULL) {
+        remoteDispatchConnError(err, conn);
+        return -1;
+    }
+
+    ret->cpu = cpu;
+    return 0;
+}
+
 /*----- Helpers. -----*/
 
 /* get_nonnull_domain and get_nonnull_network turn an on-wire
-- 
1.6.5.6


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