vl.c: Introduce getter for shutdown_requested and reset_requested.

Introduce two functions qemu_shutdown_requested_get and
qemu_reset_requested_get to get the value of shutdown/reset_requested
without reset it.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Anthony PERARD 2010-07-22 15:52:48 +01:00 committed by Alexander Graf
parent 8c12f1912a
commit 1291eb3540
2 changed files with 12 additions and 0 deletions

View File

@ -42,6 +42,8 @@ void qemu_system_shutdown_request(void);
void qemu_system_powerdown_request(void); void qemu_system_powerdown_request(void);
void qemu_system_debug_request(void); void qemu_system_debug_request(void);
void qemu_system_vmstop_request(int reason); void qemu_system_vmstop_request(int reason);
int qemu_shutdown_requested_get(void);
int qemu_reset_requested_get(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);

10
vl.c
View File

@ -1161,6 +1161,16 @@ static int powerdown_requested;
static int debug_requested; static int debug_requested;
static int vmstop_requested; static int vmstop_requested;
int qemu_shutdown_requested_get(void)
{
return shutdown_requested;
}
int qemu_reset_requested_get(void)
{
return reset_requested;
}
int qemu_shutdown_requested(void) int qemu_shutdown_requested(void)
{ {
int r = shutdown_requested; int r = shutdown_requested;