@@ -101,7 +101,7 @@ bool defaults_enabled(void);
void qemu_init(int argc, char **argv);
int qemu_main_loop(void);
-void qemu_cleanup(void);
+void qemu_cleanup(int);
extern QemuOptsList qemu_legacy_drive_opts;
extern QemuOptsList qemu_common_drive_opts;
@@ -35,7 +35,7 @@ int qemu_default_main(void)
int status;
status = qemu_main_loop();
- qemu_cleanup();
+ qemu_cleanup(status);
return status;
}
@@ -834,9 +834,9 @@ void qemu_init_subsystems(void)
}
-void qemu_cleanup(void)
+void qemu_cleanup(int status)
{
- gdb_exit(0);
+ gdb_exit(status);
/*
* cleaning up the migration object cancels any existing migration