mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 06:13:46 +08:00
Revert "Monitor: Return before exiting with 'quit'"
This reverts commit 0e8d2b5575
.
Next commits will do the same thing in a better way.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
b752daf030
commit
a875170167
@ -1020,8 +1020,7 @@ static void do_info_cpu_stats(Monitor *mon)
|
|||||||
*/
|
*/
|
||||||
static int do_quit(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
static int do_quit(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
||||||
{
|
{
|
||||||
monitor_suspend(mon);
|
exit(0);
|
||||||
qemu_system_exit_request();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
sysemu.h
2
sysemu.h
@ -45,11 +45,9 @@ void cpu_disable_ticks(void);
|
|||||||
void qemu_system_reset_request(void);
|
void qemu_system_reset_request(void);
|
||||||
void qemu_system_shutdown_request(void);
|
void qemu_system_shutdown_request(void);
|
||||||
void qemu_system_powerdown_request(void);
|
void qemu_system_powerdown_request(void);
|
||||||
void qemu_system_exit_request(void);
|
|
||||||
int qemu_shutdown_requested(void);
|
int qemu_shutdown_requested(void);
|
||||||
int qemu_reset_requested(void);
|
int qemu_reset_requested(void);
|
||||||
int qemu_powerdown_requested(void);
|
int qemu_powerdown_requested(void);
|
||||||
int qemu_exit_requested(void);
|
|
||||||
extern qemu_irq qemu_system_powerdown;
|
extern qemu_irq qemu_system_powerdown;
|
||||||
void qemu_system_reset(void);
|
void qemu_system_reset(void);
|
||||||
|
|
||||||
|
18
vl.c
18
vl.c
@ -1708,7 +1708,6 @@ static int shutdown_requested;
|
|||||||
static int powerdown_requested;
|
static int powerdown_requested;
|
||||||
int debug_requested;
|
int debug_requested;
|
||||||
int vmstop_requested;
|
int vmstop_requested;
|
||||||
static int exit_requested;
|
|
||||||
|
|
||||||
int qemu_shutdown_requested(void)
|
int qemu_shutdown_requested(void)
|
||||||
{
|
{
|
||||||
@ -1731,12 +1730,6 @@ int qemu_powerdown_requested(void)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int qemu_exit_requested(void)
|
|
||||||
{
|
|
||||||
/* just return it, we'll exit() anyway */
|
|
||||||
return exit_requested;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int qemu_debug_requested(void)
|
static int qemu_debug_requested(void)
|
||||||
{
|
{
|
||||||
int r = debug_requested;
|
int r = debug_requested;
|
||||||
@ -1807,12 +1800,6 @@ void qemu_system_powerdown_request(void)
|
|||||||
qemu_notify_event();
|
qemu_notify_event();
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemu_system_exit_request(void)
|
|
||||||
{
|
|
||||||
exit_requested = 1;
|
|
||||||
qemu_notify_event();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static void host_main_loop_wait(int *timeout)
|
static void host_main_loop_wait(int *timeout)
|
||||||
{
|
{
|
||||||
@ -1949,8 +1936,6 @@ static int vm_can_run(void)
|
|||||||
return 0;
|
return 0;
|
||||||
if (debug_requested)
|
if (debug_requested)
|
||||||
return 0;
|
return 0;
|
||||||
if (exit_requested)
|
|
||||||
return 0;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2003,9 +1988,6 @@ static void main_loop(void)
|
|||||||
if ((r = qemu_vmstop_requested())) {
|
if ((r = qemu_vmstop_requested())) {
|
||||||
vm_stop(r);
|
vm_stop(r);
|
||||||
}
|
}
|
||||||
if (qemu_exit_requested()) {
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
pause_all_vcpus();
|
pause_all_vcpus();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user