xref: /netbsd-src/sys/compat/linux/common/linux_reboot.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: linux_reboot.h,v 1.2 2008/04/28 20:23:44 martin Exp $ */
234b72dcfSerh 
334b72dcfSerh /*-
434b72dcfSerh  * Copyright (c) 2000 The NetBSD Foundation, Inc.
534b72dcfSerh  * All rights reserved.
634b72dcfSerh  *
734b72dcfSerh  * This code is derived from software contributed to The NetBSD Foundation
834b72dcfSerh  * by Eric Haszlakiewicz.
934b72dcfSerh  *
1034b72dcfSerh  * Redistribution and use in source and binary forms, with or without
1134b72dcfSerh  * modification, are permitted provided that the following conditions
1234b72dcfSerh  * are met:
1334b72dcfSerh  * 1. Redistributions of source code must retain the above copyright
1434b72dcfSerh  *    notice, this list of conditions and the following disclaimer.
1534b72dcfSerh  * 2. Redistributions in binary form must reproduce the above copyright
1634b72dcfSerh  *    notice, this list of conditions and the following disclaimer in the
1734b72dcfSerh  *    documentation and/or other materials provided with the distribution.
1834b72dcfSerh  *
1934b72dcfSerh  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2034b72dcfSerh  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2134b72dcfSerh  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2234b72dcfSerh  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2334b72dcfSerh  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2434b72dcfSerh  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2534b72dcfSerh  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2634b72dcfSerh  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2734b72dcfSerh  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2834b72dcfSerh  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2934b72dcfSerh  * POSSIBILITY OF SUCH DAMAGE.
3034b72dcfSerh  */
3134b72dcfSerh 
3234b72dcfSerh #ifndef _LINUX_REBOOT_H
3334b72dcfSerh #define _LINUX_REBOOT_H
3434b72dcfSerh 
3534b72dcfSerh /*
3634b72dcfSerh  * Magic values that Linux requires for the reboot syscall.
3734b72dcfSerh  */
3834b72dcfSerh #define LINUX_REBOOT_MAGIC1	0xfee1dead
3934b72dcfSerh #define LINUX_REBOOT_MAGIC2	672274793
4034b72dcfSerh #define LINUX_REBOOT_MAGIC2A	85072278
4134b72dcfSerh #define LINUX_REBOOT_MAGIC2B	369367448
4234b72dcfSerh 
4334b72dcfSerh /*
4434b72dcfSerh  * Reboot commands.
4534b72dcfSerh  *	RESTART		Normal reboot
4634b72dcfSerh  *	HALT
4734b72dcfSerh  *	CAD_ON		Controls action of pressing ctrl-alt-del.
4834b72dcfSerh  *	CAD_OFF			Not supported by NetBSD.
4934b72dcfSerh  *	POWER_OFF
5034b72dcfSerh  *	RESTART2	Reboot and pass a command string.
5134b72dcfSerh  */
5234b72dcfSerh #define LINUX_REBOOT_CMD_RESTART	0x01234567
5334b72dcfSerh #define LINUX_REBOOT_CMD_HALT		0xCDEF0123
5434b72dcfSerh #define LINUX_REBOOT_CMD_CAD_ON		0x89ABCDEF
5534b72dcfSerh #define LINUX_REBOOT_CMD_CAD_OFF	0x00000000
5634b72dcfSerh #define LINUX_REBOOT_CMD_POWER_OFF	0x4321FEDC
5734b72dcfSerh #define LINUX_REBOOT_CMD_RESTART2	0xA1B2C3D4
5834b72dcfSerh 
5934b72dcfSerh #endif /* !_LINUX_REBOOT_H */
60