Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.6
libvirt-7.0.0
libvirt.439942f395b03d81259979225ff415a6c665e77...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libvirt.439942f395b03d81259979225ff415a6c665e778.patch of Package libvirt-7.0.0
From: Olaf Hering <olaf@aepfle.de> Date: Thu, 25 Mar 2021 17:26:04 +0100 Subject: 439942f395b03d81259979225ff415a6c665e778 libxl: add API wrapper for libxl_domain_reboot Upcoming changes will use different LIBXL_API_VERSION variants. Prepare libxl_domain_reboot, which got a new parameter "ao_how" in Xen 4.12. libvirt does not use this parameter. No functional change intended. Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_api_wrapper.h | 14 ++++++++++++++ src/libxl/libxl_driver.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) --- a/src/libxl/libxl_api_wrapper.h +++ b/src/libxl/libxl_api_wrapper.h @@ -63,12 +63,26 @@ static inline int libxlDomainShutdownWrapper(libxl_ctx *ctx, uint32_t domid) { int ret; #if LIBXL_API_VERSION < 0x041300 ret = libxl_domain_shutdown(ctx, domid); #else ret = libxl_domain_shutdown(ctx, domid, NULL); #endif return ret; } + +static inline int +libxlDomainRebootWrapper(libxl_ctx *ctx, uint32_t domid) +{ + int ret; + +#if LIBXL_API_VERSION < 0x041300 + ret = libxl_domain_reboot(ctx, domid); +#else + ret = libxl_domain_reboot(ctx, domid, NULL); +#endif + + return ret; +} --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -1347,25 +1347,25 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags) if (!(vm = libxlDomObjFromDomain(dom))) goto cleanup; LIBXL_CHECK_DOM0_GOTO(vm->def->name, cleanup); if (virDomainRebootEnsureACL(dom->conn, vm->def, flags) < 0) goto cleanup; if (virDomainObjCheckActive(vm) < 0) goto cleanup; if (flags & VIR_DOMAIN_REBOOT_PARAVIRT) { - ret = libxl_domain_reboot(cfg->ctx, vm->def->id); + ret = libxlDomainRebootWrapper(cfg->ctx, vm->def->id); if (ret == 0) goto cleanup; virReportError(VIR_ERR_INTERNAL_ERROR, _("Failed to reboot domain '%d' with libxenlight"), vm->def->id); ret = -1; } cleanup: virDomainObjEndAPI(&vm); virObjectUnref(cfg);
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