| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: envsys.h,v 1.34 2014/05/18 11:46:24 kardel Exp $ */ | | 1 | /* $NetBSD: envsys.h,v 1.35 2016/01/22 23:33:42 dholland Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1999, 2007, 2014 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1999, 2007, 2014 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Tim Rightnour, Juan Romero Pardines and Bill Squier. | | 8 | * by Tim Rightnour, Juan Romero Pardines and Bill Squier. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -117,36 +117,36 @@ enum envsys_indicator_states { | | | @@ -117,36 +117,36 @@ enum envsys_indicator_states { |
117 | */ | | 117 | */ |
118 | #define ENVSYS_GETDICTIONARY _IOWR('E', 0, struct plistref) | | 118 | #define ENVSYS_GETDICTIONARY _IOWR('E', 0, struct plistref) |
119 | #define ENVSYS_SETDICTIONARY _IOWR('E', 1, struct plistref) | | 119 | #define ENVSYS_SETDICTIONARY _IOWR('E', 1, struct plistref) |
120 | #define ENVSYS_REMOVEPROPS _IOWR('E', 2, struct plistref) | | 120 | #define ENVSYS_REMOVEPROPS _IOWR('E', 2, struct plistref) |
121 | | | 121 | |
122 | /* | | 122 | /* |
123 | * Compatibility with old interface. Only ENVSYS_GTREDATA | | 123 | * Compatibility with old interface. Only ENVSYS_GTREDATA |
124 | * and ENVSYS_GTREINFO ioctls are supported. | | 124 | * and ENVSYS_GTREINFO ioctls are supported. |
125 | */ | | 125 | */ |
126 | | | 126 | |
127 | /* get sensor data */ | | 127 | /* get sensor data */ |
128 | | | 128 | |
129 | struct envsys_tre_data { | | 129 | struct envsys_tre_data { |
130 | u_int sensor; | | 130 | unsigned sensor; |
131 | union { /* all data is given */ | | 131 | union { /* all data is given */ |
132 | uint32_t data_us; /* in microKelvins, */ | | 132 | uint32_t data_us; /* in microKelvins, */ |
133 | int32_t data_s; /* rpms, volts, amps, */ | | 133 | int32_t data_s; /* rpms, volts, amps, */ |
134 | } cur, min, max, avg; /* ohms, watts, etc */ | | 134 | } cur, min, max, avg; /* ohms, watts, etc */ |
135 | /* see units below */ | | 135 | /* see units below */ |
136 | | | 136 | |
137 | uint32_t warnflags; /* warning flags */ | | 137 | uint32_t warnflags; /* warning flags */ |
138 | uint32_t validflags; /* sensor valid flags */ | | 138 | uint32_t validflags; /* sensor valid flags */ |
139 | u_int units; /* type of sensor */ | | 139 | unsigned units; /* type of sensor */ |
140 | }; | | 140 | }; |
141 | typedef struct envsys_tre_data envsys_tre_data_t; | | 141 | typedef struct envsys_tre_data envsys_tre_data_t; |
142 | | | 142 | |
143 | /* flags for warnflags */ | | 143 | /* flags for warnflags */ |
144 | #define ENVSYS_WARN_OK 0x00000000 /* All is well */ | | 144 | #define ENVSYS_WARN_OK 0x00000000 /* All is well */ |
145 | #define ENVSYS_WARN_UNDER 0x00000001 /* an under condition */ | | 145 | #define ENVSYS_WARN_UNDER 0x00000001 /* an under condition */ |
146 | #define ENVSYS_WARN_CRITUNDER 0x00000002 /* a critical under condition */ | | 146 | #define ENVSYS_WARN_CRITUNDER 0x00000002 /* a critical under condition */ |
147 | #define ENVSYS_WARN_OVER 0x00000004 /* an over condition */ | | 147 | #define ENVSYS_WARN_OVER 0x00000004 /* an over condition */ |
148 | #define ENVSYS_WARN_CRITOVER 0x00000008 /* a critical over condition */ | | 148 | #define ENVSYS_WARN_CRITOVER 0x00000008 /* a critical over condition */ |
149 | | | 149 | |
150 | /* drive status */ | | 150 | /* drive status */ |
151 | #define ENVSYS_DRIVE_EMPTY 1 | | 151 | #define ENVSYS_DRIVE_EMPTY 1 |
152 | #define ENVSYS_DRIVE_READY 2 | | 152 | #define ENVSYS_DRIVE_READY 2 |
| @@ -174,25 +174,25 @@ static const char * const envsysdrivesta | | | @@ -174,25 +174,25 @@ static const char * const envsysdrivesta |
174 | /* flags for validflags */ | | 174 | /* flags for validflags */ |
175 | #define ENVSYS_FVALID 0x00000001 /* sensor is valid */ | | 175 | #define ENVSYS_FVALID 0x00000001 /* sensor is valid */ |
176 | #define ENVSYS_FCURVALID 0x00000002 /* cur for this sens is valid */ | | 176 | #define ENVSYS_FCURVALID 0x00000002 /* cur for this sens is valid */ |
177 | #define ENVSYS_FMINVALID 0x00000004 /* min for this sens is valid */ | | 177 | #define ENVSYS_FMINVALID 0x00000004 /* min for this sens is valid */ |
178 | #define ENVSYS_FMAXVALID 0x00000008 /* max for this sens is valid */ | | 178 | #define ENVSYS_FMAXVALID 0x00000008 /* max for this sens is valid */ |
179 | #define ENVSYS_FAVGVALID 0x00000010 /* avg for this sens is valid */ | | 179 | #define ENVSYS_FAVGVALID 0x00000010 /* avg for this sens is valid */ |
180 | #define ENVSYS_FFRACVALID 0x00000020 /* display fraction of max */ | | 180 | #define ENVSYS_FFRACVALID 0x00000020 /* display fraction of max */ |
181 | | | 181 | |
182 | #define ENVSYS_GTREDATA _IOWR('E', 2, envsys_tre_data_t) | | 182 | #define ENVSYS_GTREDATA _IOWR('E', 2, envsys_tre_data_t) |
183 | | | 183 | |
184 | /* set and check sensor info */ | | 184 | /* set and check sensor info */ |
185 | | | 185 | |
186 | struct envsys_basic_info { | | 186 | struct envsys_basic_info { |
187 | u_int sensor; /* sensor number */ | | 187 | unsigned sensor; /* sensor number */ |
188 | u_int units; /* type of sensor */ | | 188 | unsigned units; /* type of sensor */ |
189 | char desc[33]; /* sensor description */ | | 189 | char desc[33]; /* sensor description */ |
190 | u_int rfact; /* for volts, (int)(factor x 10^4) */ | | 190 | unsigned rfact; /* for volts, (int)(factor x 10^4) */ |
191 | u_int rpms; /* for fans, set nominal RPMs */ | | 191 | unsigned rpms; /* for fans, set nominal RPMs */ |
192 | uint32_t validflags; /* sensor valid flags */ | | 192 | uint32_t validflags; /* sensor valid flags */ |
193 | }; | | 193 | }; |
194 | typedef struct envsys_basic_info envsys_basic_info_t; | | 194 | typedef struct envsys_basic_info envsys_basic_info_t; |
195 | | | 195 | |
196 | #define ENVSYS_GTREINFO _IOWR('E', 4, envsys_basic_info_t) | | 196 | #define ENVSYS_GTREINFO _IOWR('E', 4, envsys_basic_info_t) |
197 | | | 197 | |
198 | #endif /* _SYS_ENVSYS_H_ */ | | 198 | #endif /* _SYS_ENVSYS_H_ */ |