提交 013c2f15 编写于 作者: I Igor Mammedov 提交者: Anthony Liguori

Cleanup unused global var qemu_system_powerdown

All deps that used global qemu_system_powerdown var are now converted
to notifiers, so remove it.
Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 bea42280
...@@ -62,7 +62,6 @@ int qemu_reset_requested(void); ...@@ -62,7 +62,6 @@ int qemu_reset_requested(void);
int qemu_powerdown_requested(void); int qemu_powerdown_requested(void);
void qemu_system_killed(int signal, pid_t pid); void qemu_system_killed(int signal, pid_t pid);
void qemu_kill_report(void); void qemu_kill_report(void);
extern qemu_irq qemu_system_powerdown;
void qemu_devices_reset(void); void qemu_devices_reset(void);
void qemu_system_reset(bool report); void qemu_system_reset(bool report);
......
...@@ -1565,6 +1565,12 @@ void qemu_system_shutdown_request(void) ...@@ -1565,6 +1565,12 @@ void qemu_system_shutdown_request(void)
qemu_notify_event(); qemu_notify_event();
} }
static void qemu_system_powerdown(void)
{
monitor_protocol_event(QEVENT_POWERDOWN, NULL);
notifier_list_notify(&powerdown_notifiers, NULL);
}
void qemu_system_powerdown_request(void) void qemu_system_powerdown_request(void)
{ {
powerdown_requested = 1; powerdown_requested = 1;
...@@ -1588,8 +1594,6 @@ void qemu_system_vmstop_request(RunState state) ...@@ -1588,8 +1594,6 @@ void qemu_system_vmstop_request(RunState state)
qemu_notify_event(); qemu_notify_event();
} }
qemu_irq qemu_system_powerdown;
static bool main_loop_should_exit(void) static bool main_loop_should_exit(void)
{ {
RunState r; RunState r;
...@@ -1626,9 +1630,7 @@ static bool main_loop_should_exit(void) ...@@ -1626,9 +1630,7 @@ static bool main_loop_should_exit(void)
monitor_protocol_event(QEVENT_WAKEUP, NULL); monitor_protocol_event(QEVENT_WAKEUP, NULL);
} }
if (qemu_powerdown_requested()) { if (qemu_powerdown_requested()) {
monitor_protocol_event(QEVENT_POWERDOWN, NULL); qemu_system_powerdown();
notifier_list_notify(&powerdown_notifiers, NULL);
qemu_irq_raise(qemu_system_powerdown);
} }
if (qemu_vmstop_requested(&r)) { if (qemu_vmstop_requested(&r)) {
vm_stop(r); vm_stop(r);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册