From patchwork Fri Aug 21 08:31:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 31810 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 bilbo.ozlabs.org (Postfix) with ESMTPS id C8C01B7BC9 for ; Fri, 21 Aug 2009 18:33:50 +1000 (EST) Received: from localhost ([127.0.0.1]:34688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MePZA-0006zn-75 for incoming@patchwork.ozlabs.org; Fri, 21 Aug 2009 04:33:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MePXE-0006bs-43 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 04:31:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MePX9-0006aM-A9 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 04:31:43 -0400 Received: from [199.232.76.173] (port=38063 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MePX9-0006aJ-70 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 04:31:39 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:38609) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MePX8-0007Iw-Eg for qemu-devel@nongnu.org; Fri, 21 Aug 2009 04:31:38 -0400 Received: from pike.pond.sub.org (pD9E39621.dip.t-dialin.net [217.227.150.33]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 29653276D39 for ; Fri, 21 Aug 2009 10:31:35 +0200 (CEST) Received: by pike.pond.sub.org (Postfix, from userid 1000) id 943E810086; Fri, 21 Aug 2009 10:31:34 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 21 Aug 2009 10:31:32 +0200 Message-Id: <1250843494-28326-2-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1250843494-28326-1-git-send-email-armbru@redhat.com> References: <1250843494-28326-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH 1/3] Move watchdog, watchdog_action, give them internal linkage 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 Signed-off-by: Markus Armbruster --- hw/watchdog.c | 10 ++++++++++ hw/watchdog.h | 11 ----------- vl.c | 2 -- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/hw/watchdog.c b/hw/watchdog.c index fde2f1b..359c318 100644 --- a/hw/watchdog.c +++ b/hw/watchdog.c @@ -24,6 +24,16 @@ #include "sysemu.h" #include "hw/watchdog.h" +/* Possible values for action parameter. */ +#define WDT_RESET 1 /* Hard reset. */ +#define WDT_SHUTDOWN 2 /* Shutdown. */ +#define WDT_POWEROFF 3 /* Quit. */ +#define WDT_PAUSE 4 /* Pause. */ +#define WDT_DEBUG 5 /* Prints a message and continues running. */ +#define WDT_NONE 6 /* Do nothing. */ + +static WatchdogTimerModel *watchdog; +static int watchdog_action = WDT_RESET; static LIST_HEAD(watchdog_list, WatchdogTimerModel) watchdog_list; void watchdog_add_model(WatchdogTimerModel *model) diff --git a/hw/watchdog.h b/hw/watchdog.h index ad1fcfc..bb81204 100644 --- a/hw/watchdog.h +++ b/hw/watchdog.h @@ -25,13 +25,6 @@ extern void wdt_i6300esb_init(void); extern void wdt_ib700_init(void); -/* Possible values for action parameter. */ -#define WDT_RESET 1 /* Hard reset. */ -#define WDT_SHUTDOWN 2 /* Shutdown. */ -#define WDT_POWEROFF 3 /* Quit. */ -#define WDT_PAUSE 4 /* Pause. */ -#define WDT_DEBUG 5 /* Prints a message and continues running. */ -#define WDT_NONE 6 /* Do nothing. */ struct WatchdogTimerModel { LIST_ENTRY(WatchdogTimerModel) entry; @@ -48,10 +41,6 @@ struct WatchdogTimerModel { }; typedef struct WatchdogTimerModel WatchdogTimerModel; -/* in vl.c */ -extern WatchdogTimerModel *watchdog; -extern int watchdog_action; - /* in hw/watchdog.c */ extern int select_watchdog(const char *p); extern int select_watchdog_action(const char *action); diff --git a/vl.c b/vl.c index 8b2b289..9b73ea3 100644 --- a/vl.c +++ b/vl.c @@ -233,8 +233,6 @@ int graphic_rotate = 0; #ifndef _WIN32 int daemonize = 0; #endif -WatchdogTimerModel *watchdog = NULL; -int watchdog_action = WDT_RESET; const char *option_rom[MAX_OPTION_ROMS]; int nb_option_roms; int semihosting_enabled = 0;