summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen
diff options
context:
space:
mode:
authorroyger <royger@FreeBSD.org>2013-12-05 18:06:12 +0000
committerroyger <royger@FreeBSD.org>2013-12-05 18:06:12 +0000
commit2cbf0740295c624f6395e2abb71e4da935a3ab6c (patch)
tree3088f623ce9a2b6b134ce16f27d0c170fb498767 /sys/dev/xen
parent07f179266d161f0883f10fc89f19e9830e7f6ca3 (diff)
downloadFreeBSD-src-2cbf0740295c624f6395e2abb71e4da935a3ab6c.zip
FreeBSD-src-2cbf0740295c624f6395e2abb71e4da935a3ab6c.tar.gz
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)
Diffstat (limited to 'sys/dev/xen')
-rw-r--r--sys/dev/xen/control/control.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c
index a9f8d1b..bc0609d 100644
--- a/sys/dev/xen/control/control.c
+++ b/sys/dev/xen/control/control.c
@@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_poweroff;
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_reason xctrl_shutdown_reasons[] = {
{ "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)
OpenPOWER on IntegriCloud