xref: /titanic_44/usr/src/uts/common/sys/uadmin.h (revision b7f45089ccbe01bab3d7c7377b49d80d2ae18a69)
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 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 
31 #ifndef _SYS_UADMIN_H
32 #define	_SYS_UADMIN_H
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"
35 
36 #if !defined(_ASM)
37 #include <sys/types.h>
38 #include <sys/cred.h>
39 #endif
40 
41 #ifdef	__cplusplus
42 extern "C" {
43 #endif
44 
45 #define	A_REBOOT	1
46 #define	A_SHUTDOWN	2
47 #define	A_FREEZE	3	/* For freeze and thaw */
48 #define	A_REMOUNT	4
49 #define	A_DUMP		5
50 #define	A_FTRACE	15
51 #define	A_SWAPCTL	16
52 /*			17-21	   reserved for obsolete interface */
53 
54 #define	AD_HALT		0	/* halt the processor */
55 #define	AD_BOOT		1	/* multi-user reboot */
56 #define	AD_IBOOT	2	/* multi-user reboot, ask for name of file */
57 #define	AD_SBOOT	3	/* single-user reboot */
58 #define	AD_SIBOOT	4	/* single-user reboot, ask for name of file */
59 #define	AD_POWEROFF	6	/* software poweroff */
60 #define	AD_NOSYNC	7	/* do not sync filesystems on next A_DUMP */
61 
62 /*
63  * Functions reserved for A_FREEZE (may not be available on all platforms)
64  */
65 #define	AD_COMPRESS	0	/* store state file compressed during CPR */
66 #define	AD_FORCE	1	/* force to do AD_COMPRESS */
67 #define	AD_CHECK	2	/* test if CPR module is available */
68 /*
69  * NOTE: the following defines comprise an Unstable interface.  Their semantics
70  * may change or they may be removed completely in a later release
71  */
72 #define	AD_REUSEINIT	3	/* prepare for AD_REUSABLE */
73 #define	AD_REUSABLE	4	/* create reusable statefile */
74 #define	AD_REUSEFINI	5	/* revert to normal CPR mode (not reusable) */
75 
76 #define	AD_FTRACE_START	1
77 #define	AD_FTRACE_STOP	2
78 
79 #if !defined(_ASM)
80 
81 #if defined(_KERNEL)
82 extern kmutex_t ualock;
83 extern void mdboot(int, int, char *, boolean_t);
84 extern void mdpreboot(int, int, char *);
85 extern int kadmin(int, int, void *, cred_t *);
86 extern void killall(zoneid_t);
87 #endif
88 
89 #if defined(__STDC__)
90 extern int uadmin(int, int, uintptr_t);
91 #else
92 extern int uadmin();
93 #endif
94 
95 #endif	/* _ASM */
96 
97 #ifdef	__cplusplus
98 }
99 #endif
100 
101 #endif	/* _SYS_UADMIN_H */
102