[PATCH 13/15] xenUnifiedDriver: Adapt to virDomain{Resume, Suspend}Flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/xen/xen_driver.c | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index c45d980..704171f 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -903,15 +903,18 @@ xenUnifiedDomainIsUpdated(virDomainPtr dom ATTRIBUTE_UNUSED)
 }
 
 static int
-xenUnifiedDomainSuspend(virDomainPtr dom)
+xenUnifiedDomainSuspendFlags(virDomainPtr dom,
+                             unsigned int flags)
 {
     int ret = -1;
     virDomainDefPtr def;
 
+    virCheckFlags(0, -1);
+
     if (!(def = xenGetDomainDefForDom(dom)))
         goto cleanup;
 
-    if (virDomainSuspendEnsureACL(dom->conn, def) < 0)
+    if (virDomainSuspendFlagsEnsureACL(dom->conn, def) < 0)
         goto cleanup;
 
     ret = xenDaemonDomainSuspend(dom->conn, def);
@@ -922,15 +925,24 @@ cleanup:
 }
 
 static int
-xenUnifiedDomainResume(virDomainPtr dom)
+xenUnifiedDomainSuspend(virDomainPtr dom)
+{
+    return xenUnifiedDomainSuspendFlags(dom, 0);
+}
+
+static int
+xenUnifiedDomainResumeFlags(virDomainPtr dom,
+                            unsigned int flags)
 {
     int ret = -1;
     virDomainDefPtr def;
 
+    virCheckFlags(0, -1);
+
     if (!(def = xenGetDomainDefForDom(dom)))
         goto cleanup;
 
-    if (virDomainResumeEnsureACL(dom->conn, def) < 0)
+    if (virDomainResumeFlagsEnsureACL(dom->conn, def) < 0)
         goto cleanup;
 
     ret = xenDaemonDomainResume(dom->conn, def);
@@ -941,6 +953,12 @@ cleanup:
 }
 
 static int
+xenUnifiedDomainResume(virDomainPtr dom)
+{
+    return xenUnifiedDomainResumeFlags(dom, 0);
+}
+
+static int
 xenUnifiedDomainShutdownFlags(virDomainPtr dom,
                               unsigned int flags)
 {
@@ -2737,7 +2755,9 @@ static virDriver xenUnifiedDriver = {
     .domainLookupByUUID = xenUnifiedDomainLookupByUUID, /* 0.0.5 */
     .domainLookupByName = xenUnifiedDomainLookupByName, /* 0.0.3 */
     .domainSuspend = xenUnifiedDomainSuspend, /* 0.0.3 */
+    .domainSuspendFlags = xenUnifiedDomainSuspendFlags, /* 1.2.2 */
     .domainResume = xenUnifiedDomainResume, /* 0.0.3 */
+    .domainResumeFlags = xenUnifiedDomainResumeFlags, /* 1.2.2 */
     .domainShutdown = xenUnifiedDomainShutdown, /* 0.0.3 */
     .domainShutdownFlags = xenUnifiedDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = xenUnifiedDomainReboot, /* 0.1.0 */
-- 
1.8.5.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]