From owner-svn-src-all@FreeBSD.ORG Thu Dec 5 18:06:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BD9CE06; Thu, 5 Dec 2013 18:06:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E14B1064; Thu, 5 Dec 2013 18:06:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5I6Cqd039087; Thu, 5 Dec 2013 18:06:12 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5I6C8E039086; Thu, 5 Dec 2013 18:06:12 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201312051806.rB5I6C8E039086@svn.freebsd.org> From: Roger Pau Monné Date: Thu, 5 Dec 2013 18:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258995 - stable/10/sys/dev/xen/control X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 18:06:13 -0000 Author: royger Date: Thu Dec 5 18:06:12 2013 New Revision: 258995 URL: http://svnweb.freebsd.org/changeset/base/258995 Log: MFC 257876: On XenServer the "halt" message is used instead of "poweroff", which makes FreeBSD halt but not poweroff (as expected when issuing a shutdown from the VM manager). Fix this by using the same handler for both "halt" and "poweroff". NB: The "halt" signal seems to be used on XenServer only. The OSS Xen toolstack (xl) uses "poweroff" instead. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: gibbs (mentor) Approved by: re (gjb) Modified: stable/10/sys/dev/xen/control/control.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/xen/control/control.c ============================================================================== --- stable/10/sys/dev/xen/control/control.c Thu Dec 5 17:57:51 2013 (r258994) +++ stable/10/sys/dev/xen/control/control.c Thu Dec 5 18:06:12 2013 (r258995) @@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_po static xctrl_shutdown_handler_t xctrl_reboot; static xctrl_shutdown_handler_t xctrl_suspend; static xctrl_shutdown_handler_t xctrl_crash; -static xctrl_shutdown_handler_t xctrl_halt; /*-------------------------- Private Data Structures -------------------------*/ /** Element type for lookup table of event name to handler. */ @@ -173,7 +172,7 @@ static const struct xctrl_shutdown_reaso { "reboot", xctrl_reboot }, { "suspend", xctrl_suspend }, { "crash", xctrl_crash }, - { "halt", xctrl_halt }, + { "halt", xctrl_poweroff }, }; struct xctrl_softc { @@ -441,12 +440,6 @@ xctrl_crash() panic("Xen directed crash"); } -static void -xctrl_halt() -{ - shutdown_nice(RB_HALT); -} - /*------------------------------ Event Reception -----------------------------*/ static void xctrl_on_watch_event(struct xs_watch *watch, const char **vec, unsigned int len)