So far, there are no flags to implement, so just call the corresponding function with 0 passed as @flags. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/parallels/parallels_driver.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index 33260ef..ad41dbd 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -1388,28 +1388,46 @@ static int parallelsPause(virDomainObjPtr privdom) } static int -parallelsDomainSuspend(virDomainPtr domain) +parallelsDomainSuspendFlags(virDomainPtr domain, + unsigned int flags) { + virCheckFlags(0, -1); + return parallelsDomainChangeState(domain, VIR_DOMAIN_RUNNING, "running", parallelsPause, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_USER); } +static int +parallelsDomainSuspend(virDomainPtr domain) +{ + return parallelsDomainSuspendFlags(domain, 0); +} + static int parallelsResume(virDomainObjPtr privdom) { return parallelsCmdRun(PRLCTL, "resume", PARALLELS_UUID(privdom), NULL); } static int -parallelsDomainResume(virDomainPtr domain) +parallelsDomainResumeFlags(virDomainPtr domain, + unsigned int flags) { + virCheckFlags(0, -1); + return parallelsDomainChangeState(domain, VIR_DOMAIN_PAUSED, "paused", parallelsResume, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_UNPAUSED); } +static int +parallelsDomainResume(virDomainPtr domain) +{ + return parallelsDomainResumeFlags(domain, 0); +} + static int parallelsStart(virDomainObjPtr privdom) { return parallelsCmdRun(PRLCTL, "start", PARALLELS_UUID(privdom), NULL); @@ -2401,7 +2419,9 @@ static virDriver parallelsDriver = { .domainIsPersistent = parallelsDomainIsPersistent, /* 0.10.0 */ .domainGetAutostart = parallelsDomainGetAutostart, /* 0.10.0 */ .domainSuspend = parallelsDomainSuspend, /* 0.10.0 */ + .domainSuspendFlags = parallelsDomainSuspendFlags, /* 1.2.2 */ .domainResume = parallelsDomainResume, /* 0.10.0 */ + .domainResumeFlags = parallelsDomainResumeFlags, /* 1.2.2 */ .domainDestroy = parallelsDomainDestroy, /* 0.10.0 */ .domainShutdown = parallelsDomainShutdown, /* 0.10.0 */ .domainCreate = parallelsDomainCreate, /* 0.10.0 */ -- 1.8.5.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list