* [Qemu-devel] [PATCH] Stop before shutdown
@ 2008-04-09 22:56 Eduardo Felipe
0 siblings, 0 replies; only message in thread
From: Eduardo Felipe @ 2008-04-09 22:56 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]
Hi,
Attached patch adds a new option to stop the emulation just before shutdown.
This allows switching to monitor for selective committing of snapshoted
devices and such.
Regards,
Edu
--- vl.c Thu Apr 10 00:36:35 2008
+++ vl.c Thu Apr 10 00:36:45 2008
@@ -215,6 +215,7 @@
int acpi_enabled = 1;
int fd_bootchk = 1;
int no_reboot = 0;
+int stop_shutdown = 0;
int cursor_hide = 1;
int graphic_rotate = 0;
int daemonize = 0;
@@ -7570,7 +7571,12 @@
if (shutdown_requested) {
ret = EXCP_INTERRUPT;
- break;
+ if (stop_shutdown) {
+ vm_stop(0);
+ stop_shutdown = 0;
+ }
+ else
+ break;
}
if (reset_requested) {
reset_requested = 0;
@@ -7729,6 +7735,7 @@
"-curses use a curses/ncurses interface instead of
SDL\n"
#endif
"-no-reboot exit instead of rebooting\n"
+ "-stop-shutdown stop before shutdown\n"
"-loadvm file start right away with a saved state (loadvm in
monitor)\n"
"-vnc display start a VNC server on display\n"
#ifndef _WIN32
@@ -7835,6 +7842,7 @@
QEMU_OPTION_no_acpi,
QEMU_OPTION_curses,
QEMU_OPTION_no_reboot,
+ QEMU_OPTION_stop_shutdown,
QEMU_OPTION_show_cursor,
QEMU_OPTION_daemonize,
QEMU_OPTION_option_rom,
@@ -7940,6 +7948,7 @@
{ "vmwarevga", 0, QEMU_OPTION_vmsvga },
{ "no-acpi", 0, QEMU_OPTION_no_acpi },
{ "no-reboot", 0, QEMU_OPTION_no_reboot },
+ { "stop-shutdown", 0, QEMU_OPTION_stop_shutdown },
{ "show-cursor", 0, QEMU_OPTION_show_cursor },
{ "daemonize", 0, QEMU_OPTION_daemonize },
{ "option-rom", HAS_ARG, QEMU_OPTION_option_rom },
@@ -8728,6 +8737,9 @@
break;
case QEMU_OPTION_no_reboot:
no_reboot = 1;
+ break;
+ case QEMU_OPTION_stop_shutdown:
+ stop_shutdown = 1;
break;
case QEMU_OPTION_show_cursor:
cursor_hide = 0;
[-- Attachment #2: Type: text/html, Size: 4730 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-09 22:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 22:56 [Qemu-devel] [PATCH] Stop before shutdown Eduardo Felipe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).