提交 ab5eb92b 编写于 作者: M Michal Privoznik

destroy: Implement internal API for openvz driver

上级 2dd3f025
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册