What's the difference of these two method to call bdrv_close_all? If you close qemu window, the main_loop will return immediately, and call bdrv_close_all.
2012/5/16 Pavel Dovgaluk <pavel.dovga...@ispras.ru> > Prevent disk data loss when closing qemu window. > > Signed-off-by: Pavel Dovgalyuk <pavel.dovga...@gmail.com> > --- > vl.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/vl.c b/vl.c > index 23ab3a3..b6cfd29 100644 > --- a/vl.c > +++ b/vl.c > @@ -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(); > > > > > -- linuxer and emacser and pythoner living in beijing blog: http://mathslinux.org twitter: https://twitter.com/mathslinux google+: https://plus.google.com/118129852578326338750