提交 dbc78199 编写于 作者: M Mikhail Feoktistov 提交者: Dmitry Guryanov

vz: implementation of domainReboot callback

Diff from v1.
1. Add virCheckFlags() call in vzDomainReboot
上级 1158184f
......@@ -923,6 +923,13 @@ static int vzDomainShutdown(virDomainPtr domain)
return prlsdkDomainChangeState(domain, prlsdkStop);
}
static int vzDomainReboot(virDomainPtr domain,
unsigned int flags)
{
virCheckFlags(0, -1);
return prlsdkDomainChangeState(domain, prlsdkRestart);
}
static int vzDomainIsActive(virDomainPtr domain)
{
virDomainObjPtr dom = NULL;
......@@ -1486,6 +1493,7 @@ static virHypervisorDriver vzDriver = {
.domainShutdown = vzDomainShutdown, /* 0.10.0 */
.domainCreate = vzDomainCreate, /* 0.10.0 */
.domainCreateWithFlags = vzDomainCreateWithFlags, /* 1.2.10 */
.domainReboot = vzDomainReboot, /* 1.2.22 */
.domainDefineXML = vzDomainDefineXML, /* 0.10.0 */
.domainDefineXMLFlags = vzDomainDefineXMLFlags, /* 1.2.12 */
.domainUndefine = vzDomainUndefine, /* 1.2.10 */
......
......@@ -1831,6 +1831,14 @@ PRL_RESULT prlsdkSuspend(PRL_HANDLE sdkdom)
return waitJob(job);
}
PRL_RESULT prlsdkRestart(PRL_HANDLE sdkdom)
{
PRL_HANDLE job = PRL_INVALID_HANDLE;
job = PrlVm_Restart(sdkdom);
return waitJob(job);
}
int
prlsdkDomainChangeStateLocked(vzConnPtr privconn,
virDomainObjPtr dom,
......
......@@ -41,6 +41,7 @@ PRL_RESULT prlsdkStop(PRL_HANDLE sdkdom);
PRL_RESULT prlsdkPause(PRL_HANDLE sdkdom);
PRL_RESULT prlsdkResume(PRL_HANDLE sdkdom);
PRL_RESULT prlsdkSuspend(PRL_HANDLE sdkdom);
PRL_RESULT prlsdkRestart(PRL_HANDLE sdkdom);
typedef PRL_RESULT (*prlsdkChangeStateFunc)(PRL_HANDLE sdkdom);
int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册