From: Pavel Machek Subject: Re: [RFC PATCH 26/35] Add Xen subarch reboot support Date: Fri, 12 May 2006 21:46:55 +0000 Message-ID: <20060512214655.GC4189@ucw.cz> References: <20060509084945.373541000@sous-sol.org> <20060509085158.282993000@sous-sol.org> <200605091902.31327.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <200605091902.31327.ak@suse.de> Sender: linux-kernel-owner@vger.kernel.org To: Andi Kleen Cc: virtualization@lists.osdl.org, Chris Wright , linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com, Ian Pratt List-Id: xen-devel@lists.xenproject.org Hi! > > + > > +/* Ignore multiple shutdown requests. */ > > +static int shutting_down = SHUTDOWN_INVALID; > > +static void __shutdown_handler(void *unused); > > +static DECLARE_WORK(shutdown_work, __shutdown_handler, NULL); > > + > > +static int shutdown_process(void *__unused) > > +{ > > + static char *envp[] = { "HOME=/", "TERM=linux", > > + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; > > + static char *poweroff_argv[] = { "/sbin/poweroff", NULL }; > > This should be configurable, probably in a sysctl Actually we have similar code in sparc and acpi parts, IIRC. We probably want to have one, common, shut-me-off routine. -- Thanks for all the (sleeping) penguins.