From patchwork Mon Aug 23 09:50:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [13/15] vl.c: Introduce getter for shutdown_requested and reset_requested. Date: Sun, 22 Aug 2010 23:50:50 -0000 From: Stefano Stabellini X-Patchwork-Id: 62470 Message-Id: <1282557052-14285-13-git-send-email-stefano.stabellini@eu.citrix.com> To: qemu-devel@nongnu.org Cc: Anthony.Perard@citrix.com, Anthony PERARD , xen-devel@lists.xensource.com, stefano.stabellini@eu.citrix.com From: Anthony PERARD 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 Signed-off-by: Stefano Stabellini --- sysemu.h | 2 ++ vl.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/sysemu.h b/sysemu.h index a1f6466..7facfae 100644 --- a/sysemu.h +++ b/sysemu.h @@ -51,6 +51,8 @@ void cpu_disable_ticks(void); void qemu_system_reset_request(void); void qemu_system_shutdown_request(void); void qemu_system_powerdown_request(void); +int qemu_shutdown_requested_get(void); +int qemu_reset_requested_get(void); int qemu_shutdown_requested(void); int qemu_reset_requested(void); int qemu_powerdown_requested(void); diff --git a/vl.c b/vl.c index dd88806..3316063 100644 --- a/vl.c +++ b/vl.c @@ -1130,6 +1130,16 @@ static int powerdown_requested; int debug_requested; 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 r = shutdown_requested;