From patchwork Mon Oct 11 16:07:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 67448 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E0D6EB70A5 for ; Tue, 12 Oct 2010 03:58:40 +1100 (EST) Received: from localhost ([127.0.0.1]:47905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5Lhm-0005vW-67 for incoming@patchwork.ozlabs.org; Mon, 11 Oct 2010 12:58:30 -0400 Received: from [140.186.70.92] (port=58793 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5KvK-0008Qj-Vh for qemu-devel@nongnu.org; Mon, 11 Oct 2010 12:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5Kv6-0002Z5-W4 for qemu-devel@nongnu.org; Mon, 11 Oct 2010 12:08:26 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:33126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5Kv6-0002WD-Ru for qemu-devel@nongnu.org; Mon, 11 Oct 2010 12:08:12 -0400 X-IronPort-AV: E=Sophos;i="4.57,314,1283745600"; d="scan'208";a="117578007" Received: from ftlpexchmx02.citrite.net ([10.9.154.127]) by FTLPIPO02.CITRIX.COM with ESMTP; 11 Oct 2010 12:08:12 -0400 Received: from smtp01.ad.xensource.com ([10.219.128.104]) by FTLPEXCHMX02.citrite.net with Microsoft SMTPSVC(6.0.3790.4675); Mon, 11 Oct 2010 12:08:12 -0400 Received: from perard.cam.xci-test.com (perard.cam.xci-test.com [10.80.248.106]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id o9BG7ZX7001204; Mon, 11 Oct 2010 09:08:11 -0700 From: anthony.perard@citrix.com To: qemu-devel@nongnu.org Date: Mon, 11 Oct 2010 17:07:07 +0100 Message-Id: <1286813230-17539-12-git-send-email-anthony.perard@citrix.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1286813230-17539-1-git-send-email-anthony.perard@citrix.com> References: <1286813230-17539-1-git-send-email-anthony.perard@citrix.com> X-OriginalArrivalTime: 11 Oct 2010 16:08:12.0318 (UTC) FILETIME=[810D83E0:01CB695E] X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Anthony PERARD , Stefano Stabellini , xen-devel@lists.xensource.com, Stefano.Stabellini@eu.citrix.com Subject: [Qemu-devel] [PATCH V5 11/14] vl.c: Introduce getter for shutdown_requested and reset_requested. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 1500dfe..ae5258e 100644 --- a/vl.c +++ b/vl.c @@ -1131,6 +1131,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;