[libvirt PATCH 2/2] qemu: Drop driver parameter from qemuDomainSetFakeReboot

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

 



And its callers. The parameter is no longer used since virDomainObjSave
was replaced with qemuDomainSaveStatus wrapper.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c  |  3 +--
 src/qemu/qemu_domain.h  |  3 +--
 src/qemu/qemu_driver.c  | 14 +++++++-------
 src/qemu/qemu_process.c | 13 ++++++-------
 src/qemu/qemu_process.h |  3 +--
 5 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a8bc1252fa..3f10f9306f 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7161,8 +7161,7 @@ qemuDomainRemoveInactiveJobLocked(virQEMUDriver *driver,
 
 
 void
-qemuDomainSetFakeReboot(virQEMUDriver *driver G_GNUC_UNUSED,
-                        virDomainObj *vm,
+qemuDomainSetFakeReboot(virDomainObj *vm,
                         bool value)
 {
     qemuDomainObjPrivate *priv = vm->privateData;
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 5474d1dccc..38c6ffb76b 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -641,8 +641,7 @@ int qemuDomainSnapshotDiscardAllMetadata(virQEMUDriver *driver,
 void qemuDomainRemoveInactive(virQEMUDriver *driver,
                               virDomainObj *vm);
 
-void qemuDomainSetFakeReboot(virQEMUDriver *driver,
-                             virDomainObj *vm,
+void qemuDomainSetFakeReboot(virDomainObj *vm,
                              bool value);
 
 int qemuDomainCheckDiskStartupPolicy(virQEMUDriver *driver,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index db2b25adbd..c9a372ce2b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1902,7 +1902,7 @@ qemuDomainShutdownFlagsAgent(virQEMUDriver *driver,
     if (!qemuDomainAgentAvailable(vm, reportError))
         goto endjob;
 
-    qemuDomainSetFakeReboot(driver, vm, false);
+    qemuDomainSetFakeReboot(vm, false);
     agent = qemuDomainObjEnterAgent(vm);
     ret = qemuAgentShutdown(agent, agentFlag);
     qemuDomainObjExitAgent(vm, agent);
@@ -1932,7 +1932,7 @@ qemuDomainShutdownFlagsMonitor(virQEMUDriver *driver,
         goto endjob;
     }
 
-    qemuDomainSetFakeReboot(driver, vm, isReboot);
+    qemuDomainSetFakeReboot(vm, isReboot);
     qemuDomainObjEnterMonitor(driver, vm);
     ret = qemuMonitorSystemPowerdown(priv->mon);
     qemuDomainObjExitMonitor(driver, vm);
@@ -2031,7 +2031,7 @@ qemuDomainRebootAgent(virQEMUDriver *driver,
     if (virDomainObjCheckActive(vm) < 0)
         goto endjob;
 
-    qemuDomainSetFakeReboot(driver, vm, false);
+    qemuDomainSetFakeReboot(vm, false);
     agent = qemuDomainObjEnterAgent(vm);
     ret = qemuAgentShutdown(agent, agentFlag);
     qemuDomainObjExitAgent(vm, agent);
@@ -2057,7 +2057,7 @@ qemuDomainRebootMonitor(virQEMUDriver *driver,
     if (virDomainObjCheckActive(vm) < 0)
         goto endjob;
 
-    qemuDomainSetFakeReboot(driver, vm, isReboot);
+    qemuDomainSetFakeReboot(vm, isReboot);
     qemuDomainObjEnterMonitor(driver, vm);
     ret = qemuMonitorSystemPowerdown(priv->mon);
     qemuDomainObjExitMonitor(driver, vm);
@@ -2213,7 +2213,7 @@ qemuDomainDestroyFlags(virDomainPtr dom,
         goto endjob;
     }
 
-    qemuDomainSetFakeReboot(driver, vm, false);
+    qemuDomainSetFakeReboot(vm, false);
 
     if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN)
         stopFlags |= VIR_QEMU_PROCESS_STOP_MIGRATED;
@@ -3613,8 +3613,8 @@ processGuestPanicEvent(virQEMUDriver *driver,
         G_GNUC_FALLTHROUGH;
 
     case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART:
-        qemuDomainSetFakeReboot(driver, vm, true);
-        qemuProcessShutdownOrReboot(driver, vm);
+        qemuDomainSetFakeReboot(vm, true);
+        qemuProcessShutdownOrReboot(vm);
         break;
 
     case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE:
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 8bd7bf8155..de1146251d 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -498,7 +498,7 @@ qemuProcessFakeReboot(void *opaque)
 
  cleanup:
     priv->pausedShutdown = false;
-    qemuDomainSetFakeReboot(driver, vm, false);
+    qemuDomainSetFakeReboot(vm, false);
     if (ret == -1)
         ignore_value(qemuProcessKill(vm, VIR_QEMU_PROCESS_KILL_FORCE));
     virDomainObjEndAPI(&vm);
@@ -506,8 +506,7 @@ qemuProcessFakeReboot(void *opaque)
 
 
 void
-qemuProcessShutdownOrReboot(virQEMUDriver *driver,
-                            virDomainObj *vm)
+qemuProcessShutdownOrReboot(virDomainObj *vm)
 {
     qemuDomainObjPrivate *priv = vm->privateData;
 
@@ -526,7 +525,7 @@ qemuProcessShutdownOrReboot(virQEMUDriver *driver,
             VIR_ERROR(_("Failed to create reboot thread, killing domain"));
             ignore_value(qemuProcessKill(vm, VIR_QEMU_PROCESS_KILL_NOWAIT));
             priv->pausedShutdown = false;
-            qemuDomainSetFakeReboot(driver, vm, false);
+            qemuDomainSetFakeReboot(vm, false);
             virObjectUnref(vm);
         }
     } else {
@@ -622,7 +621,7 @@ qemuProcessHandleShutdown(qemuMonitor *mon G_GNUC_UNUSED,
     if (priv->agent)
         qemuAgentNotifyEvent(priv->agent, QEMU_AGENT_EVENT_SHUTDOWN);
 
-    qemuProcessShutdownOrReboot(driver, vm);
+    qemuProcessShutdownOrReboot(vm);
 
  unlock:
     virObjectUnlock(vm);
@@ -5630,7 +5629,7 @@ qemuProcessInit(virQEMUDriver *driver,
         }
     } else {
         vm->def->id = qemuDriverAllocateID(driver);
-        qemuDomainSetFakeReboot(driver, vm, false);
+        qemuDomainSetFakeReboot(vm, false);
         virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_STARTING_UP);
 
         if (g_atomic_int_add(&driver->nactive, 1) == 0 && driver->inhibitCallback)
@@ -8866,7 +8865,7 @@ qemuProcessReconnect(void *opaque)
          reason == VIR_DOMAIN_PAUSED_USER)) {
         VIR_DEBUG("Finishing shutdown sequence for domain %s",
                   obj->def->name);
-        qemuProcessShutdownOrReboot(driver, obj);
+        qemuProcessShutdownOrReboot(obj);
         goto cleanup;
     }
 
diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h
index c0f1c85aab..ab276da15c 100644
--- a/src/qemu/qemu_process.h
+++ b/src/qemu/qemu_process.h
@@ -168,8 +168,7 @@ typedef enum {
 
 int qemuProcessKill(virDomainObj *vm, unsigned int flags);
 
-void qemuProcessShutdownOrReboot(virQEMUDriver *driver,
-                                 virDomainObj *vm);
+void qemuProcessShutdownOrReboot(virDomainObj *vm);
 
 int qemuProcessAutoDestroyInit(virQEMUDriver *driver);
 void qemuProcessAutoDestroyShutdown(virQEMUDriver *driver);
-- 
2.34.1




[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]

  Powered by Linux