]> git.proxmox.com Git - qemu.git/commitdiff
Cleanup unused global var qemu_system_powerdown
authorIgor Mammedov <imammedo@redhat.com>
Wed, 5 Sep 2012 21:06:25 +0000 (23:06 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 25 Sep 2012 23:37:41 +0000 (18:37 -0500)
All deps that used global qemu_system_powerdown var are now converted
to notifiers, so remove it.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysemu.h
vl.c

index 803c8588cff1d0baa28f1c86ee6ccf9205f49d31..109304672dc26db05476a655a0122ff4d16166e8 100644 (file)
--- a/sysemu.h
+++ b/sysemu.h
@@ -62,7 +62,6 @@ int qemu_reset_requested(void);
 int qemu_powerdown_requested(void);
 void qemu_system_killed(int signal, pid_t pid);
 void qemu_kill_report(void);
-extern qemu_irq qemu_system_powerdown;
 void qemu_devices_reset(void);
 void qemu_system_reset(bool report);
 
diff --git a/vl.c b/vl.c
index a65759ad5af09683ce0ca7ba2037c0ecc16113cf..599d17a7526ffcf8e10418d33db11363ec09c254 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1565,6 +1565,12 @@ void qemu_system_shutdown_request(void)
     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)
 {
     powerdown_requested = 1;
@@ -1588,8 +1594,6 @@ void qemu_system_vmstop_request(RunState state)
     qemu_notify_event();
 }
 
-qemu_irq qemu_system_powerdown;
-
 static bool main_loop_should_exit(void)
 {
     RunState r;
@@ -1626,9 +1630,7 @@ static bool main_loop_should_exit(void)
         monitor_protocol_event(QEVENT_WAKEUP, NULL);
     }
     if (qemu_powerdown_requested()) {
-        monitor_protocol_event(QEVENT_POWERDOWN, NULL);
-        notifier_list_notify(&powerdown_notifiers, NULL);
-        qemu_irq_raise(qemu_system_powerdown);
+        qemu_system_powerdown();
     }
     if (qemu_vmstop_requested(&r)) {
         vm_stop(r);