[PATCH 11/15] vboxDriver: 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/vbox/vbox_tmpl.c | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 1be4dc4..6576125 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1573,7 +1573,10 @@ cleanup:
     return ret;
 }
 
-static int vboxDomainSuspend(virDomainPtr dom) {
+static int
+vboxDomainSuspendFlags(virDomainPtr dom,
+                       unsigned int flags)
+{
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
     vboxIID iid = VBOX_IID_INITIALIZER;
@@ -1582,6 +1585,8 @@ static int vboxDomainSuspend(virDomainPtr dom) {
     PRUint32 state;
     nsresult rc;
 
+    virCheckFlags(0, -1);
+
     vboxIIDFromUUID(&iid, dom->uuid);
     rc = VBOX_OBJECT_GET_MACHINE(iid.value, &machine);
     if (NS_FAILED(rc)) {
@@ -1624,7 +1629,16 @@ cleanup:
     return ret;
 }
 
-static int vboxDomainResume(virDomainPtr dom) {
+static int
+vboxDomainSuspend(virDomainPtr dom)
+{
+    return vboxDomainSuspendFlags(dom, 0);
+}
+
+static int
+vboxDomainResumeFlags(virDomainPtr dom,
+                      unsigned int flags)
+{
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
     vboxIID iid = VBOX_IID_INITIALIZER;
@@ -1634,6 +1648,8 @@ static int vboxDomainResume(virDomainPtr dom) {
 
     PRBool isAccessible = PR_FALSE;
 
+    virCheckFlags(0, -1);
+
     vboxIIDFromUUID(&iid, dom->uuid);
     rc = VBOX_OBJECT_GET_MACHINE(iid.value, &machine);
     if (NS_FAILED(rc)) {
@@ -1676,6 +1692,12 @@ cleanup:
     return ret;
 }
 
+static int
+vboxDomainResume(virDomainPtr dom)
+{
+    return vboxDomainResumeFlags(dom, 0);
+}
+
 static int vboxDomainShutdownFlags(virDomainPtr dom,
                                    unsigned int flags) {
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
@@ -9500,7 +9522,9 @@ virDriver NAME(Driver) = {
     .domainLookupByUUID = vboxDomainLookupByUUID, /* 0.6.3 */
     .domainLookupByName = vboxDomainLookupByName, /* 0.6.3 */
     .domainSuspend = vboxDomainSuspend, /* 0.6.3 */
+    .domainSuspendFlags = vboxDomainSuspendFlags, /* 1.2.2 */
     .domainResume = vboxDomainResume, /* 0.6.3 */
+    .domainResumeFlags = vboxDomainResumeFlags, /* 1.2.2 */
     .domainShutdown = vboxDomainShutdown, /* 0.6.3 */
     .domainShutdownFlags = vboxDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = vboxDomainReboot, /* 0.6.3 */
-- 
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]