[Qemu-devel] [PATCH v8 09/13] qemu.py: always cleanup on shutdown()

Amador Pahim posted 13 patches 8 years, 2 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v8 09/13] qemu.py: always cleanup on shutdown()
Posted by Amador Pahim 8 years, 2 months ago
Currently we only cleanup on shutdown() if the VM is running.

To make sure we will always cleanup, this patch makes the cleanup to
always happen in shutdown, regardless the VM running state.

Signed-off-by: Amador Pahim <apahim@redhat.com>
---
 scripts/qemu.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 06f07bfaa2..ede734328b 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -205,8 +205,8 @@ class QEMUMachine(object):
                 self._popen.kill()
             self._popen.wait()
 
-            self._load_io_log()
-            self._post_shutdown()
+        self._load_io_log()
+        self._post_shutdown()
 
         exitcode = self.exitcode()
         if exitcode is not None and exitcode < 0:
-- 
2.13.5


Re: [Qemu-devel] [PATCH v8 09/13] qemu.py: always cleanup on shutdown()
Posted by Fam Zheng 8 years, 2 months ago
On Fri, 09/01 13:28, Amador Pahim wrote:
> Currently we only cleanup on shutdown() if the VM is running.
> 
> To make sure we will always cleanup, this patch makes the cleanup to
> always happen in shutdown, regardless the VM running state.
> 
> Signed-off-by: Amador Pahim <apahim@redhat.com>

Reviewed-by: Fam Zheng <famz@redhat.com>