Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP3:Update
xen.36362
libxl-7c313e8365eb663311a0cf39f77b4f5880244765....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libxl-7c313e8365eb663311a0cf39f77b4f5880244765.patch of Package xen.36362
From: Anthony PERARD <anthony.perard@citrix.com> Date: Tue, 11 May 2021 10:28:08 +0100 Subject: libxl 7c313e8365eb663311a0cf39f77b4f5880244765 References: bsc#1180350 libxl: Export libxl__qmp_ev_qemu_compare_version We are going to want to check QEMU's version in other places where we can use libxl__ev_qmp_send. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jason Andryuk <jandryuk@gmail.com> --- tools/libxl/libxl_internal.h | 8 ++++++++ tools/libxl/libxl_qmp.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -497,6 +497,14 @@ _hidden int libxl__ev_qmp_send(libxl__eg const char *cmd, libxl__json_object *args); _hidden void libxl__ev_qmp_dispose(libxl__gc *gc, libxl__ev_qmp *ev); +/* return values: + * < 0 if qemu's version < asked version + * = 0 if qemu's version == asked version + * > 0 if qemu's version > asked version + */ +_hidden int libxl__qmp_ev_qemu_compare_version(libxl__ev_qmp *ev, int major, + int minor, int micro); + typedef enum { /* initial state */ qmp_state_disconnected = 1, --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -289,7 +289,7 @@ static int qmp_handle_response(libxl__gc * = 0 if qemu's version == asked version * > 0 if qemu's version > asked version */ -static int qmp_ev_qemu_compare_version(libxl__ev_qmp *ev, int major, +int libxl__qmp_ev_qemu_compare_version(libxl__ev_qmp *ev, int major, int minor, int micro) { assert(ev->state == qmp_state_connected); @@ -1073,7 +1073,7 @@ static void dm_state_save_to_fdset(libxl /* The `live` parameter was added to QEMU 2.11. It signals QEMU that * the save operation is for a live migration rather than for taking a * snapshot. */ - if (qmp_ev_qemu_compare_version(ev, 2, 11, 0) >= 0) + if (libxl__qmp_ev_qemu_compare_version(ev, 2, 11, 0) >= 0) libxl__qmp_param_add_bool(gc, &args, "live", dsps->live); QMP_PARAMETERS_SPRINTF(&args, "filename", "/dev/fdset/%d", fdset); rc = libxl__ev_qmp_send(egc, ev, "xen-save-devices-state", args);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor