|
| From: | Avi Kivity |
| Subject: | [Qemu-devel] Re: [PATCH 10/11] QMP: Introduce basic events |
| Date: | Tue, 23 Jun 2009 12:46:06 +0300 |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
On 06/23/2009 07:29 AM, Luiz Capitulino wrote:
Reboot, shutdown and powerdown are very basic events and can be added together.
Reboot only exists within a guest. qemu sees a reset (there are reboots not associated with a reset, for example kexec).
diff --git a/vl.c b/vl.c
index 60a00e1..7dc5954 100644
--- a/vl.c
+++ b/vl.c
@@ -3693,18 +3693,21 @@ void qemu_system_reset_request(void)
reset_requested = 1;
}
qemu_notify_event();
+ monitor_notify_event(EVENT_REBOOT);
}
void qemu_system_shutdown_request(void)
{
shutdown_requested = 1;
qemu_notify_event();
+ monitor_notify_event(EVENT_SHUTDOWN);
}
void qemu_system_powerdown_request(void)
{
powerdown_requested = 1;
qemu_notify_event();
+ monitor_notify_event(EVENT_POWERDOWN);
}
Maybe it's better to signal the event when the reset etc. actually takes place, to avoid subtle races.
-- error compiling committee.c: too many arguments to function
| [Prev in Thread] | Current Thread | [Next in Thread] |