Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/uadmin.h
+++ new/usr/src/uts/common/sys/uadmin.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23 + *
22 24 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 25 * Use is subject to license terms.
24 26 */
25 27
26 28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 29 /* All Rights Reserved */
28 30
29 31
30 32 #ifndef _SYS_UADMIN_H
31 33 #define _SYS_UADMIN_H
32 34
33 35
34 36 #if !defined(_ASM)
35 37 #include <sys/types.h>
36 38 #include <sys/cred.h>
37 39 #endif
38 40
39 41 #ifdef __cplusplus
40 42 extern "C" {
41 43 #endif
42 44
43 45 #define A_REBOOT 1
44 46 #define A_SHUTDOWN 2
45 47 #define A_FREEZE 3 /* For freeze and thaw */
46 48 #define A_REMOUNT 4
47 49 #define A_DUMP 5
48 50 #define A_FTRACE 15
49 51 #define A_SWAPCTL 16
50 52 /* 17-21 reserved for obsolete interface */
51 53 #define A_SDTTEST 22 /* DTrace sdt:::test */
52 54 #define A_CONFIG 23 /* For system configuration */
53 55
54 56 #define AD_UNKNOWN -1 /* no method */
55 57 #define AD_HALT 0 /* halt the processor */
56 58 #define AD_BOOT 1 /* multi-user reboot */
57 59 #define AD_IBOOT 2 /* multi-user reboot, ask for name of file */
58 60 #define AD_SBOOT 3 /* single-user reboot */
59 61 #define AD_SIBOOT 4 /* single-user reboot, ask for name of file */
60 62 #define AD_POWEROFF 6 /* software poweroff */
61 63 #define AD_NOSYNC 7 /* do not sync filesystems on next A_DUMP */
62 64 #define AD_FASTREBOOT 8 /* bypass firmware and boot loader */
63 65 #define AD_FASTREBOOT_DRYRUN 9 /* Fast reboot Dry run */
64 66
65 67 /*
66 68 * Functions reserved for A_FREEZE (may not be available on all platforms)
67 69 * Note: AD_COMPRESS, AD_CHECK and AD_FORCE are now obsolete
68 70 * The first two are succeeded by AD_SUSPEND_TO_DISK and
69 71 * AD_CHECK_SUSPEND_TO_DISK respectively.
70 72 * AD_FORCE should not be used by any new application
71 73 *
72 74 * We maintain compatibility with the earlier interfaces:
73 75 * AD_COMPRESS and AD_CHECK, by preserving those values
74 76 * in the corresponding new interfaces
75 77 */
76 78
77 79 #define AD_COMPRESS 0 /* store state file compressed during CPR */
78 80 #define AD_FORCE 1 /* force to do AD_COMPRESS */
79 81 #define AD_CHECK 2 /* test if CPR module is available */
80 82 #define AD_SUSPEND_TO_DISK AD_COMPRESS /* A_FREEZE, CPR or ACPI S4 */
81 83 #define AD_CHECK_SUSPEND_TO_DISK AD_CHECK /* A_FREEZE, CPR/S4 capable? */
82 84 #define AD_SUSPEND_TO_RAM 20 /* A_FREEZE, S3 */
83 85 #define AD_CHECK_SUSPEND_TO_RAM 21 /* A_FREEZE, S3 capable? */
84 86
85 87 /*
86 88 * NOTE: the following defines comprise an Unstable interface. Their semantics
87 89 * may change or they may be removed completely in a later release
88 90 */
89 91 #define AD_REUSEINIT 3 /* prepare for AD_REUSABLE */
90 92 #define AD_REUSABLE 4 /* create reusable statefile */
91 93 #define AD_REUSEFINI 5 /* revert to normal CPR mode (not reusable) */
92 94
93 95 #define AD_FTRACE_START 1
94 96 #define AD_FTRACE_STOP 2
95 97
96 98 /*
97 99 * Functions of A_CONFIG. Unstable interface.
98 100 */
99 101 #define AD_UPDATE_BOOT_CONFIG 1 /* Update boot config variables */
100 102
101 103 /*
102 104 * When 'mdep' (the second argument to uadmin(2)) is initialized for A_REBOOT,
103 105 * A_SHUTDOWN or A_DUMP, it represents the boot arguments string of at most
104 106 * 256 characters.
105 107 */
106 108 #define BOOTARGS_MAX 256
107 109
108 110 #if !defined(_KERNEL)
109 111 /*
110 112 * FMRI for boot-config service.
111 113 */
112 114 #define FMRI_BOOT_CONFIG \
113 115 "svc:/system/boot-config:default"
114 116
115 117 /*
116 118 * Property group that contains all Fast Reboot configuration properties.
117 119 */
118 120 #define BOOT_CONFIG_PG_PARAMS "config"
119 121
120 122 /*
121 123 * Property group that contains all Fast Reboot blacklisting information.
122 124 */
123 125 #define BOOT_CONFIG_PG_FBBLACKLIST "fastreboot_blacklist"
124 126
125 127 /*
126 128 * Non-persistent property group which contains all the properties that
127 129 * will override settings in the BOOT_CONFIG_PG_PARAMS property group.
128 130 */
129 131 #define BOOT_CONFIG_PG_OVR "config_ovr"
130 132
131 133 #endif /* _KERNEL */
132 134
133 135 /*
134 136 * Flag representations of fastboot configuration.
135 137 */
136 138 #define UA_FASTREBOOT_DEFAULT 0x01
137 139 #define UA_FASTREBOOT_ONPANIC 0x02
138 140
139 141 #define FASTREBOOT_DEFAULT "fastreboot_default"
140 142 #define FASTREBOOT_ONPANIC "fastreboot_onpanic"
141 143 #define FASTREBOOT_ONPANIC_CMDLINE "fastreboot_onpanic_cmdline"
142 144
143 145 #define FASTREBOOT_ONPANIC_NOTSET(p) \
144 146 (strcmp((p), "false") == 0 || \
145 147 strcmp((p), "no") == 0 || \
146 148 strcmp((p), "0") == 0)
147 149
148 150 #define FASTREBOOT_ONPANIC_ISSET(p) \
149 151 (strcmp((p), "true") == 0 || \
150 152 strcmp((p), "yes") == 0 || \
151 153 strcmp((p), "1") == 0)
152 154
↓ open down ↓ |
121 lines elided |
↑ open up ↑ |
153 155 #if !defined(_ASM)
154 156
155 157 #if defined(_KERNEL)
156 158 extern kmutex_t ualock;
157 159 extern void mdboot(int, int, char *, boolean_t);
158 160 extern void mdpreboot(int, int, char *);
159 161 extern int kadmin(int, int, void *, cred_t *);
160 162 extern void killall(zoneid_t);
161 163 #endif
162 164
163 -#if defined(__STDC__)
164 165 extern int uadmin(int, int, uintptr_t);
165 -#else
166 -extern int uadmin();
167 -#endif
168 166
169 167 #endif /* _ASM */
170 168
171 169 #ifdef __cplusplus
172 170 }
173 171 #endif
174 172
175 173 #endif /* _SYS_UADMIN_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX