xref: /onnv-gate/usr/src/uts/common/sys/uadmin.h (revision 136:19bbb3246a07)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
50Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
70Sstevel@tonic-gate  * with the License.
80Sstevel@tonic-gate  *
90Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate  * See the License for the specific language governing permissions
120Sstevel@tonic-gate  * and limitations under the License.
130Sstevel@tonic-gate  *
140Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate  *
200Sstevel@tonic-gate  * CDDL HEADER END
210Sstevel@tonic-gate  */
220Sstevel@tonic-gate /*
23*136Sachartre  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
280Sstevel@tonic-gate /*	  All Rights Reserved  	*/
290Sstevel@tonic-gate 
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #ifndef _SYS_UADMIN_H
320Sstevel@tonic-gate #define	_SYS_UADMIN_H
330Sstevel@tonic-gate 
340Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #if !defined(_ASM)
370Sstevel@tonic-gate #include <sys/types.h>
380Sstevel@tonic-gate #include <sys/cred.h>
390Sstevel@tonic-gate #endif
400Sstevel@tonic-gate 
410Sstevel@tonic-gate #ifdef	__cplusplus
420Sstevel@tonic-gate extern "C" {
430Sstevel@tonic-gate #endif
440Sstevel@tonic-gate 
450Sstevel@tonic-gate #define	A_REBOOT	1
460Sstevel@tonic-gate #define	A_SHUTDOWN	2
470Sstevel@tonic-gate #define	A_FREEZE	3	/* For freeze and thaw */
480Sstevel@tonic-gate #define	A_REMOUNT	4
490Sstevel@tonic-gate #define	A_DUMP		5
500Sstevel@tonic-gate #define	A_FTRACE	15
510Sstevel@tonic-gate #define	A_SWAPCTL	16
520Sstevel@tonic-gate /*			17-21	   reserved for obsolete interface */
530Sstevel@tonic-gate 
540Sstevel@tonic-gate #define	AD_HALT		0	/* halt the processor */
550Sstevel@tonic-gate #define	AD_BOOT		1	/* multi-user reboot */
560Sstevel@tonic-gate #define	AD_IBOOT	2	/* multi-user reboot, ask for name of file */
570Sstevel@tonic-gate #define	AD_SBOOT	3	/* single-user reboot */
580Sstevel@tonic-gate #define	AD_SIBOOT	4	/* single-user reboot, ask for name of file */
590Sstevel@tonic-gate #define	AD_POWEROFF	6	/* software poweroff */
600Sstevel@tonic-gate #define	AD_NOSYNC	7	/* do not sync filesystems on next A_DUMP */
610Sstevel@tonic-gate 
620Sstevel@tonic-gate /*
630Sstevel@tonic-gate  * Functions reserved for A_FREEZE (may not be available on all platforms)
640Sstevel@tonic-gate  */
650Sstevel@tonic-gate #define	AD_COMPRESS	0	/* store state file compressed during CPR */
660Sstevel@tonic-gate #define	AD_FORCE	1	/* force to do AD_COMPRESS */
670Sstevel@tonic-gate #define	AD_CHECK	2	/* test if CPR module is available */
680Sstevel@tonic-gate /*
690Sstevel@tonic-gate  * NOTE: the following defines comprise an Unstable interface.  Their semantics
700Sstevel@tonic-gate  * may change or they may be removed completely in a later release
710Sstevel@tonic-gate  */
720Sstevel@tonic-gate #define	AD_REUSEINIT	3	/* prepare for AD_REUSABLE */
730Sstevel@tonic-gate #define	AD_REUSABLE	4	/* create reusable statefile */
740Sstevel@tonic-gate #define	AD_REUSEFINI	5	/* revert to normal CPR mode (not reusable) */
750Sstevel@tonic-gate 
760Sstevel@tonic-gate #define	AD_FTRACE_START	1
770Sstevel@tonic-gate #define	AD_FTRACE_STOP	2
780Sstevel@tonic-gate 
790Sstevel@tonic-gate #if !defined(_ASM)
800Sstevel@tonic-gate 
810Sstevel@tonic-gate #if defined(_KERNEL)
820Sstevel@tonic-gate extern kmutex_t ualock;
83*136Sachartre extern void mdboot(int, int, char *, boolean_t);
840Sstevel@tonic-gate extern void mdpreboot(int, int, char *);
850Sstevel@tonic-gate extern int kadmin(int, int, void *, cred_t *);
860Sstevel@tonic-gate extern void killall(zoneid_t);
870Sstevel@tonic-gate #endif
880Sstevel@tonic-gate 
890Sstevel@tonic-gate #if defined(__STDC__)
900Sstevel@tonic-gate extern int uadmin(int, int, uintptr_t);
910Sstevel@tonic-gate #else
920Sstevel@tonic-gate extern int uadmin();
930Sstevel@tonic-gate #endif
940Sstevel@tonic-gate 
950Sstevel@tonic-gate #endif	/* _ASM */
960Sstevel@tonic-gate 
970Sstevel@tonic-gate #ifdef	__cplusplus
980Sstevel@tonic-gate }
990Sstevel@tonic-gate #endif
1000Sstevel@tonic-gate 
1010Sstevel@tonic-gate #endif	/* _SYS_UADMIN_H */
102