--- src/xenapi/xenapi_driver.c | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index dae7e26..3f3a630 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -767,14 +767,22 @@ xenapiDomainResume (virDomainPtr dom) } /* - * xenapiDomainShutdown + * xenapiDomainShutdownFlags: + * @dom: domain object + * @flags: an OR'ed set of virDomainShutdownFlagsValues + * + * Calling this function with no @flags set (equal to zero) + * is equivalent to calling xenapiDomainShutdown. * * shutsdown a VM * Returns 0 on success or -1 in case of error */ static int -xenapiDomainShutdown (virDomainPtr dom) +xenapiDomainShutdownFlags(virDomainPtr dom, + unsigned int flags) { + virCheckFlags(0, -1); + /* vm.clean_shutdown */ xen_vm vm; xen_vm_set *vms; @@ -802,6 +810,18 @@ xenapiDomainShutdown (virDomainPtr dom) } /* + * xenapiDomainShutdown: + * @dom: domain object + * + * See xenapiDomainShutdownFlags + */ +static int +xenapiDomainShutdown(virDomainPtr dom) +{ + return xenapiDomainShutdownFlags(dom, 0); +} + +/* * xenapiDomainReboot * * Reboots a VM @@ -1901,6 +1921,7 @@ static virDriver xenapiDriver = { .domainSuspend = xenapiDomainSuspend, /* 0.8.0 */ .domainResume = xenapiDomainResume, /* 0.8.0 */ .domainShutdown = xenapiDomainShutdown, /* 0.8.0 */ + .domainShutdownFlags = xenapiDomainShutdownFlags, /* 0.9.4 */ .domainReboot = xenapiDomainReboot, /* 0.8.0 */ .domainDestroy = xenapiDomainDestroy, /* 0.8.0 */ .domainDestroyFlags = xenapiDomainDestroyFlags, /* 0.9.4 */ -- 1.7.5.rc3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list