Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- daemon/remote.c | 22 ++++++++++++++++++++++ src/remote/remote_protocol.x | 13 ++++++++++++- 2 files changed, 34 insertions(+), 1 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 7a43046..1b6be42 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -5226,6 +5226,28 @@ 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, args->flags); + if (result == VIR_CPU_COMPARE_ERROR) { + remoteDispatchConnError(err, conn); + return -1; + } + + ret->result = result; + return 0; +} + + /*----- Helpers. -----*/ /* get_nonnull_domain and get_nonnull_network turn an on-wire diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 92f7010..32820cd 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -1433,6 +1433,16 @@ struct remote_interface_is_active_ret { }; +struct remote_cpu_compare_args { + remote_nonnull_string xml; + unsigned flags; +}; + +struct remote_cpu_compare_ret { + int result; +}; + + /*----- Protocol. -----*/ /* Define the program number, protocol version and procedure numbers here. */ @@ -1611,7 +1621,8 @@ enum remote_procedure { REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154, REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155, REMOTE_PROC_INTERFACE_IS_ACTIVE = 156, - REMOTE_PROC_GET_LIB_VERSION = 157 + REMOTE_PROC_GET_LIB_VERSION = 157, + REMOTE_PROC_CPU_COMPARE = 158 /* * Notice how the entries are grouped in sets of 10 ? -- 1.6.5.7 -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list