xref: /titanic_51/usr/src/uts/common/sys/reboot.h (revision f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_REBOOT_H
28 #define	_SYS_REBOOT_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
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 #if defined(__STDC__)
69 extern int reboot(int, char *);
70 #else
71 extern int reboot();
72 #endif
73 
74 #if defined(_KERNEL)
75 
76 extern int boothowto;
77 
78 #if defined(_BOOT)
79 extern void bootflags(char *, size_t);
80 #else
81 struct bootops;
82 extern void bootflags(struct bootops *);
83 #endif	/* _BOOT */
84 
85 #endif	/* _KERNEL */
86 
87 #endif	/* _ASM */
88 
89 #ifdef	__cplusplus
90 }
91 #endif
92 
93 #endif	/* _SYS_REBOOT_H */
94