Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/systeminfo.h
+++ new/usr/src/uts/common/sys/systeminfo.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_SYSTEMINFO_H
31 33 #define _SYS_SYSTEMINFO_H
32 34
33 35 #ifdef __cplusplus
34 36 extern "C" {
35 37 #endif
36 38
37 39 #ifdef _KERNEL
38 40 extern char architecture[];
39 41 extern char architecture_32[];
40 42 extern char hw_serial[]; /* machine's 32-bit hostid; a decimal string */
41 43 extern char hw_provider[];
42 44 extern char srpc_domain[];
43 45 extern char platform[];
44 46 #endif /* _KERNEL */
45 47
46 48 /*
47 49 * Commands to sysinfo(2)
48 50 *
49 51 * Values for sysinfo(2) commands are to be assigned by the following
50 52 * algorithm:
51 53 *
52 54 * 1 - 256 Unix International assigned numbers for `get' style commands.
53 55 * 257 - 512 Unix International assigned numbers for `set' style commands
54 56 * where the value is selected to be the value for the
55 57 * corresponding `get' command plus 256.
56 58 * 513 - 768 Solaris specific `get' style commands.
57 59 * 769 - 1024 Solaris specific `set' style commands where the value is
58 60 * selected to be the value for the corresponding `get' command
59 61 * plus 256.
60 62 *
61 63 * These values have be registered
62 64 * with Unix International can't be corrected now. The status of a command
63 65 * as published or unpublished does not alter the algorithm.
64 66 */
65 67
66 68 /* UI defined `get' commands (1-256) */
67 69 #define SI_SYSNAME 1 /* return name of operating system */
68 70 #define SI_HOSTNAME 2 /* return name of node */
69 71 #define SI_RELEASE 3 /* return release of operating system */
70 72 #define SI_VERSION 4 /* return version field of utsname */
71 73 #define SI_MACHINE 5 /* return kind of machine */
72 74 #define SI_ARCHITECTURE 6 /* return instruction set arch */
73 75 #define SI_HW_SERIAL 7 /* return hardware serial number */
74 76 #define SI_HW_PROVIDER 8 /* return hardware manufacturer */
75 77 #define SI_SRPC_DOMAIN 9 /* return secure RPC domain */
76 78
77 79 /* UI defined `set' commands (257-512) */
78 80 #define SI_SET_HOSTNAME 258 /* set name of node */
79 81 #define SI_SET_SRPC_DOMAIN 265 /* set secure RPC domain */
80 82
81 83 /* Solaris defined `get' commands (513-768) */
82 84 #define SI_PLATFORM 513 /* return platform identifier */
83 85 #define SI_ISALIST 514 /* return supported isa list */
84 86 #define SI_DHCP_CACHE 515 /* return kernel-cached DHCPACK */
85 87 #define SI_ARCHITECTURE_32 516 /* basic 32-bit SI_ARCHITECTURE */
86 88 #define SI_ARCHITECTURE_64 517 /* basic 64-bit SI_ARCHITECTURE */
87 89 #define SI_ARCHITECTURE_K 518 /* kernel SI_ARCHITECTURE equivalent */
88 90 #define SI_ARCHITECTURE_NATIVE 519 /* SI_ARCHITECTURE of the caller */
89 91
90 92 /* Solaris defined `set' commands (769-1024) (none currently assigned) */
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
91 93
92 94
93 95 #define HW_INVALID_HOSTID 0xFFFFFFFF /* an invalid hostid */
94 96 #define HW_HOSTID_LEN 11 /* minimum buffer size needed */
95 97 /* to hold a decimal or hex */
96 98 /* hostid string */
97 99 #define DOM_NM_LN 64 /* maximum length of domain */
98 100 /* name */
99 101
100 102 #if !defined(_KERNEL)
101 -#if defined(__STDC__)
102 103 int sysinfo(int, char *, long);
103 -#else
104 -int sysinfo();
105 104 #endif
106 -#endif
107 105
108 106 #ifdef __cplusplus
109 107 }
110 108 #endif
111 109
112 110 #endif /* _SYS_SYSTEMINFO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX