[PATCH 3/3] qemu: Remove useless block in processWatchdogEvent

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

 



Best viewed with -w since this is mostly just an indentation patch.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 49 +++++++++++++++++++++++--------------------------
 1 file changed, 23 insertions(+), 26 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8a3e61c96f11..28859366ee32 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3938,42 +3938,39 @@ processWatchdogEvent(virQEMUDriverPtr driver,
     int ret;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
     char *dumpfile = getAutoDumpPath(driver, vm);
+    unsigned int flags = VIR_DUMP_MEMORY_ONLY;

     if (!dumpfile)
         goto cleanup;

     switch (action) {
     case VIR_DOMAIN_WATCHDOG_ACTION_DUMP:
-        {
-            unsigned int flags = VIR_DUMP_MEMORY_ONLY;
-
-            if (qemuDomainObjBeginAsyncJob(driver, vm,
-                                           QEMU_ASYNC_JOB_DUMP) < 0) {
-                goto cleanup;
-            }
+        if (qemuDomainObjBeginAsyncJob(driver, vm,
+                                       QEMU_ASYNC_JOB_DUMP) < 0) {
+            goto cleanup;
+        }

-            if (!virDomainObjIsActive(vm)) {
-                virReportError(VIR_ERR_OPERATION_INVALID,
-                               "%s", _("domain is not running"));
-                goto endjob;
-            }
+        if (!virDomainObjIsActive(vm)) {
+            virReportError(VIR_ERR_OPERATION_INVALID,
+                           "%s", _("domain is not running"));
+            goto endjob;
+        }

-            flags |= cfg->autoDumpBypassCache ? VIR_DUMP_BYPASS_CACHE: 0;
-            ret = doCoreDump(driver, vm, dumpfile,
-                             getCompressionType(driver), flags,
-                             VIR_DOMAIN_CORE_DUMP_FORMAT_RAW);
-            if (ret < 0)
-                virReportError(VIR_ERR_OPERATION_FAILED,
-                               "%s", _("Dump failed"));
+        flags |= cfg->autoDumpBypassCache ? VIR_DUMP_BYPASS_CACHE: 0;
+        ret = doCoreDump(driver, vm, dumpfile,
+                         getCompressionType(driver), flags,
+                         VIR_DOMAIN_CORE_DUMP_FORMAT_RAW);
+        if (ret < 0)
+            virReportError(VIR_ERR_OPERATION_FAILED,
+                           "%s", _("Dump failed"));

-            ret = qemuProcessStartCPUs(driver, vm, NULL,
-                                       VIR_DOMAIN_RUNNING_UNPAUSED,
-                                       QEMU_ASYNC_JOB_DUMP);
+        ret = qemuProcessStartCPUs(driver, vm, NULL,
+                                   VIR_DOMAIN_RUNNING_UNPAUSED,
+                                   QEMU_ASYNC_JOB_DUMP);

-            if (ret < 0)
-                virReportError(VIR_ERR_OPERATION_FAILED,
-                               "%s", _("Resuming after dump failed"));
-        }
+        if (ret < 0)
+            virReportError(VIR_ERR_OPERATION_FAILED,
+                           "%s", _("Resuming after dump failed"));
         break;
     default:
         goto cleanup;
-- 
2.9.0

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