From ab5eb92bbd9f1077cd93626c321404f952db198e Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 21 Jul 2011 09:49:02 +0200 Subject: [PATCH] destroy: Implement internal API for openvz driver --- src/openvz/openvz_driver.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index f0c6f577e4..4e7cb034ba 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -577,12 +577,16 @@ cleanup: return ret; } -static int openvzDomainShutdown(virDomainPtr dom) { +static int +openvzDomainShutdownFlags(virDomainPtr dom, + unsigned int flags) { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; const char *prog[] = {VZCTL, "--quiet", "stop", PROGRAM_SENTINAL, NULL}; int ret = -1; + virCheckFlags(0, -1); + openvzDriverLock(driver); vm = virDomainFindByUUID(&driver->domains, dom->uuid); openvzDriverUnlock(driver); @@ -614,6 +618,12 @@ cleanup: return ret; } +static int +openvzDomainShutdown(virDomainPtr dom) +{ + return openvzDomainShutdownFlags(dom, 0); +} + static int openvzDomainReboot(virDomainPtr dom, unsigned int flags) { @@ -1621,6 +1631,7 @@ static virDriver openvzDriver = { .domainShutdown = openvzDomainShutdown, /* 0.3.1 */ .domainReboot = openvzDomainReboot, /* 0.3.1 */ .domainDestroy = openvzDomainShutdown, /* 0.3.1 */ + .domainDestroyFlags = openvzDomainShutdownFlags, /* 0.9.4 */ .domainGetOSType = openvzGetOSType, /* 0.3.1 */ .domainGetInfo = openvzDomainGetInfo, /* 0.3.1 */ .domainGetState = openvzDomainGetState, /* 0.9.2 */ -- GitLab