From a041ae571d11db25f9f62e98958b4e53b62fb788 Mon Sep 17 00:00:00 2001 From: Nikolay Shirokovskiy Date: Fri, 24 Jun 2016 17:32:34 +0300 Subject: [PATCH] vz: add missing flagged versions of API functions Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 5e088f55b1..75cec6ced5 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -1084,13 +1084,15 @@ vzDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) } static int -vzDomainDestroy(virDomainPtr domain) +vzDomainDestroyFlags(virDomainPtr domain, unsigned int flags) { vzConnPtr privconn = domain->conn->privateData; virDomainObjPtr dom; int ret = -1; bool job = false; + virCheckFlags(0, -1); + if (!(dom = vzDomObjFromDomainRef(domain))) return -1; @@ -1118,13 +1120,21 @@ vzDomainDestroy(virDomainPtr domain) } static int -vzDomainShutdown(virDomainPtr domain) +vzDomainDestroy(virDomainPtr dom) +{ + return vzDomainDestroyFlags(dom, 0); +} + +static int +vzDomainShutdownFlags(virDomainPtr domain, unsigned int flags) { vzConnPtr privconn = domain->conn->privateData; virDomainObjPtr dom; int ret = -1; bool job = false; + virCheckFlags(0, -1); + if (!(dom = vzDomObjFromDomainRef(domain))) return -1; @@ -1151,6 +1161,11 @@ vzDomainShutdown(virDomainPtr domain) return ret; } +static int vzDomainShutdown(virDomainPtr dom) +{ + return vzDomainShutdownFlags(dom, 0); +} + static int vzDomainReboot(virDomainPtr domain, unsigned int flags) { @@ -3163,7 +3178,9 @@ static virHypervisorDriver vzHypervisorDriver = { .domainSuspend = vzDomainSuspend, /* 0.10.0 */ .domainResume = vzDomainResume, /* 0.10.0 */ .domainDestroy = vzDomainDestroy, /* 0.10.0 */ + .domainDestroyFlags = vzDomainDestroyFlags, /* 2.2.0 */ .domainShutdown = vzDomainShutdown, /* 0.10.0 */ + .domainShutdownFlags = vzDomainShutdownFlags, /* 2.2.0 */ .domainCreate = vzDomainCreate, /* 0.10.0 */ .domainCreateWithFlags = vzDomainCreateWithFlags, /* 1.2.10 */ .domainReboot = vzDomainReboot, /* 1.3.0 */