xref: /illumos-gate/usr/src/uts/common/sys/reboot.h (revision ba3594ba)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24  *
25  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26  * Use is subject to license terms.
27  */
28 
29 #ifndef	_SYS_REBOOT_H
30 #define	_SYS_REBOOT_H
31 
32 #ifndef _ASM
33 #include <sys/types.h>
34 #endif
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * Boot flags and flags to "reboot" system call.
42  *
43  * Not all of these necessarily apply to all machines.
44  */
45 #define	RB_AUTOBOOT	0	/* flags for system auto-booting itself */
46 
47 #define	RB_ASKNAME		0x00000001 /* prompt for boot file name */
48 #define	RB_SINGLE		0x00000002 /* reboot to single user only */
49 #define	RB_NOSYNC		0x00000004 /* dont sync before reboot */
50 #define	RB_HALT			0x00000008 /* don't reboot, just halt */
51 #define	RB_INITNAME		0x00000010 /* name given for /etc/init */
52 #define	RB_NOBOOTRC		0x00000020 /* don't run /etc/rc.boot */
53 #define	RB_DEBUG		0x00000040 /* being run under debugger */
54 #define	RB_DUMP			0x00000080 /* dump system core */
55 #define	RB_WRITABLE		0x00000100 /* mount root read/write */
56 #define	RB_STRING		0x00000200 /* pass boot args to prom monitor */
57 #define	RB_CONFIG		0x00000800 /* pass to init on a boot -c */
58 #define	RB_RECONFIG		0x00001000 /* pass to init on a boot -r */
59 #define	RB_VERBOSE		0x00002000 /* set for chatty boot */
60 #define	RB_FORTHDEBUG		0x00004000 /* load forthdebug module */
61 #define	RB_FORTHDEBUGDBP 	0x00008000 /* load forthdebug, enable def bpt */
62 #define	RB_KMDB			0x00020000 /* load kmdb during boot */
63 #define	RB_NOBOOTCLUSTER 	0x00040000 /* don't boot as a cluster */
64 #define	RB_DEBUGENTER		0x00080000 /* enter the debugger at boot */
65 
66 #ifndef _ASM
67 
68 extern int reboot(int, char *);
69 
70 #if defined(_KERNEL)
71 
72 extern int boothowto;
73 
74 #if defined(_BOOT)
75 extern void bootflags(char *, size_t);
76 #else
77 struct bootops;
78 extern void bootflags(struct bootops *);
79 #endif	/* _BOOT */
80 
81 #endif	/* _KERNEL */
82 
83 #endif	/* _ASM */
84 
85 #ifdef	__cplusplus
86 }
87 #endif
88 
89 #endif	/* _SYS_REBOOT_H */
90