Skip to contentSkip to conversation

Prevent disk data loss when closing qemu

PATCH Superseded Pavel Dovgaluk 1 participant 1 message May 16, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Prevent disk data loss when closing qemu

Prevent disk data loss when closing qemu window.

---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
vl.c +1 -1
index 23ab3a3..b6cfd29 100644
@@ -3650,10 +3650,10 @@ int main(int argc, char **argv, char **envp)
     }
 
     os_setup_post();
+    atexit(bdrv_close_all);
 
     resume_all_vcpus();
     main_loop();
-    bdrv_close_all();
     pause_all_vcpus();
     net_cleanup();
     res_free();