Sat Jan 23 01:26:14 2016 UTC ()
Apparently a recent round of vandalism by the C++ standards committee
includes disallowing the standard and historic type name "unsigned". Add
a gratuitous "int" to recent changes.

C++ is really a blight on the world.


(dholland)
diff -r1.6 -r1.7 src/include/ifaddrs.h
diff -r1.22 -r1.23 src/include/link_aout.h
diff -r1.22 -r1.23 src/include/nsswitch.h
diff -r1.12 -r1.13 src/include/login_cap.h
diff -r1.7 -r1.8 src/lib/libpci/pci.h
diff -r1.8 -r1.9 src/sys/fs/msdosfs/direntry.h
diff -r1.35 -r1.36 src/sys/sys/envsys.h
diff -r1.5 -r1.6 src/sys/sys/fdio.h
diff -r1.4 -r1.5 src/sys/sys/wdog.h

cvs diff -r1.6 -r1.7 src/include/ifaddrs.h (switch to unified diff)

--- src/include/ifaddrs.h 2016/01/22 21:55:57 1.6
+++ src/include/ifaddrs.h 2016/01/23 01:26:14 1.7
@@ -1,56 +1,56 @@ @@ -1,56 +1,56 @@
1/* $NetBSD: ifaddrs.h,v 1.6 2016/01/22 21:55:57 dholland Exp $ */ 1/* $NetBSD: ifaddrs.h,v 1.7 2016/01/23 01:26:14 dholland Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1995, 1999 4 * Copyright (c) 1995, 1999
5 * Berkeley Software Design, Inc. All rights reserved. 5 * Berkeley Software Design, Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND 13 * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE 16 * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE. 23 * SUCH DAMAGE.
24 * 24 *
25 * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp 25 * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
26 */ 26 */
27 27
28#ifndef _IFADDRS_H_ 28#ifndef _IFADDRS_H_
29#define _IFADDRS_H_ 29#define _IFADDRS_H_
30 30
31struct ifaddrs { 31struct ifaddrs {
32 struct ifaddrs *ifa_next; 32 struct ifaddrs *ifa_next;
33 char *ifa_name; 33 char *ifa_name;
34 unsigned ifa_flags; 34 unsigned int ifa_flags;
35 struct sockaddr *ifa_addr; 35 struct sockaddr *ifa_addr;
36 struct sockaddr *ifa_netmask; 36 struct sockaddr *ifa_netmask;
37 struct sockaddr *ifa_dstaddr; 37 struct sockaddr *ifa_dstaddr;
38 void *ifa_data; 38 void *ifa_data;
39}; 39};
40 40
41/* 41/*
42 * This may have been defined in <net/if.h>. Note that if <net/if.h> is 42 * This may have been defined in <net/if.h>. Note that if <net/if.h> is
43 * to be included it must be included before this header file. 43 * to be included it must be included before this header file.
44 */ 44 */
45#ifndef ifa_broadaddr 45#ifndef ifa_broadaddr
46#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ 46#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
47#endif 47#endif
48 48
49#include <sys/cdefs.h> 49#include <sys/cdefs.h>
50 50
51__BEGIN_DECLS 51__BEGIN_DECLS
52int getifaddrs(struct ifaddrs **); 52int getifaddrs(struct ifaddrs **);
53void freeifaddrs(struct ifaddrs *); 53void freeifaddrs(struct ifaddrs *);
54__END_DECLS 54__END_DECLS
55 55
56#endif /* !_IFADDRS_H_ */ 56#endif /* !_IFADDRS_H_ */

cvs diff -r1.22 -r1.23 src/include/link_aout.h (switch to unified diff)

--- src/include/link_aout.h 2016/01/22 21:55:57 1.22
+++ src/include/link_aout.h 2016/01/23 01:26:14 1.23

cvs diff -r1.22 -r1.23 src/include/nsswitch.h (switch to unified diff)

--- src/include/nsswitch.h 2016/01/22 21:55:57 1.22
+++ src/include/nsswitch.h 2016/01/23 01:26:14 1.23
@@ -1,230 +1,230 @@ @@ -1,230 +1,230 @@
1/* $NetBSD: nsswitch.h,v 1.22 2016/01/22 21:55:57 dholland Exp $ */ 1/* $NetBSD: nsswitch.h,v 1.23 2016/01/23 01:26:14 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. 4 * Copyright (c) 1997, 1998, 1999, 2004 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 Luke Mewburn. 8 * by Luke Mewburn.
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.
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the 16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution. 17 * documentation and/or other materials provided with the distribution.
18 * 18 *
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#ifndef _NSSWITCH_H 32#ifndef _NSSWITCH_H
33#define _NSSWITCH_H 1 33#define _NSSWITCH_H 1
34 34
35#include <sys/types.h> 35#include <sys/types.h>
36#include <stdarg.h> 36#include <stdarg.h>
37 37
38#define NSS_MODULE_INTERFACE_VERSION 0 38#define NSS_MODULE_INTERFACE_VERSION 0
39 39
40#ifndef _PATH_NS_CONF 40#ifndef _PATH_NS_CONF
41#define _PATH_NS_CONF "/etc/nsswitch.conf" 41#define _PATH_NS_CONF "/etc/nsswitch.conf"
42#endif 42#endif
43 43
44#define NS_CONTINUE 0 44#define NS_CONTINUE 0
45#define NS_RETURN 1 45#define NS_RETURN 1
46 46
47/* 47/*
48 * Layout of: 48 * Layout of:
49 * uint32_t ns_src.flags 49 * uint32_t ns_src.flags
50 */  50 */
51 /* nsswitch.conf status codes and nsdispatch(3) return values */ 51 /* nsswitch.conf status codes and nsdispatch(3) return values */
52#define NS_SUCCESS (1<<0) /* entry was found */ 52#define NS_SUCCESS (1<<0) /* entry was found */
53#define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */ 53#define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */
54#define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */ 54#define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */
55#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */ 55#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */
56#define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */ 56#define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */
57 57
58 /* internal nsdispatch(3) flags; not settable in nsswitch.conf(5) */ 58 /* internal nsdispatch(3) flags; not settable in nsswitch.conf(5) */
59#define NS_FORCEALL (1<<8) /* force all methods to be invoked; */ 59#define NS_FORCEALL (1<<8) /* force all methods to be invoked; */
60 60
61/* 61/*
62 * Currently implemented sources. 62 * Currently implemented sources.
63 */ 63 */
64#define NSSRC_FILES "files" /* local files */ 64#define NSSRC_FILES "files" /* local files */
65#define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */ 65#define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */
66#define NSSRC_NIS "nis" /* YP/NIS */ 66#define NSSRC_NIS "nis" /* YP/NIS */
67#define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */ 67#define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */
68 68
69/* 69/*
70 * Currently implemented databases. 70 * Currently implemented databases.
71 */ 71 */
72#define NSDB_HOSTS "hosts" 72#define NSDB_HOSTS "hosts"
73#define NSDB_GROUP "group" 73#define NSDB_GROUP "group"
74#define NSDB_GROUP_COMPAT "group_compat" 74#define NSDB_GROUP_COMPAT "group_compat"
75#define NSDB_NETGROUP "netgroup" 75#define NSDB_NETGROUP "netgroup"
76#define NSDB_NETWORKS "networks" 76#define NSDB_NETWORKS "networks"
77#define NSDB_PASSWD "passwd" 77#define NSDB_PASSWD "passwd"
78#define NSDB_PASSWD_COMPAT "passwd_compat" 78#define NSDB_PASSWD_COMPAT "passwd_compat"
79#define NSDB_SHELLS "shells" 79#define NSDB_SHELLS "shells"
80 80
81/* 81/*
82 * Suggested databases to implement. 82 * Suggested databases to implement.
83 */ 83 */
84#define NSDB_ALIASES "aliases" 84#define NSDB_ALIASES "aliases"
85#define NSDB_AUTH "auth" 85#define NSDB_AUTH "auth"
86#define NSDB_AUTOMOUNT "automount" 86#define NSDB_AUTOMOUNT "automount"
87#define NSDB_BOOTPARAMS "bootparams" 87#define NSDB_BOOTPARAMS "bootparams"
88#define NSDB_ETHERS "ethers" 88#define NSDB_ETHERS "ethers"
89#define NSDB_EXPORTS "exports" 89#define NSDB_EXPORTS "exports"
90#define NSDB_NETMASKS "netmasks" 90#define NSDB_NETMASKS "netmasks"
91#define NSDB_PHONES "phones" 91#define NSDB_PHONES "phones"
92#define NSDB_PRINTCAP "printcap" 92#define NSDB_PRINTCAP "printcap"
93#define NSDB_PROTOCOLS "protocols" 93#define NSDB_PROTOCOLS "protocols"
94#define NSDB_REMOTE "remote" 94#define NSDB_REMOTE "remote"
95#define NSDB_RPC "rpc" 95#define NSDB_RPC "rpc"
96#define NSDB_SENDMAILVARS "sendmailvars" 96#define NSDB_SENDMAILVARS "sendmailvars"
97#define NSDB_SERVICES "services" 97#define NSDB_SERVICES "services"
98#define NSDB_TERMCAP "termcap" 98#define NSDB_TERMCAP "termcap"
99#define NSDB_TTYS "ttys" 99#define NSDB_TTYS "ttys"
100 100
101/* 101/*
102 * ns_dtab `callback' function signature. 102 * ns_dtab `callback' function signature.
103 */ 103 */
104typedef int (*nss_method)(void *, void *, va_list); 104typedef int (*nss_method)(void *, void *, va_list);
105 105
106/* 106/*
107 * ns_dtab - `nsswitch dispatch table' 107 * ns_dtab - `nsswitch dispatch table'
108 * Contains an entry for each source and the appropriate function to call. 108 * Contains an entry for each source and the appropriate function to call.
109 */ 109 */
110typedef struct { 110typedef struct {
111 const char *src; 111 const char *src;
112 nss_method callback; 112 nss_method callback;
113 void *cb_data; 113 void *cb_data;
114} ns_dtab; 114} ns_dtab;
115 115
116/* 116/*
117 * Macros to help build an ns_dtab[] 117 * Macros to help build an ns_dtab[]
118 */ 118 */
119#define NS_FILES_CB(F,C) { NSSRC_FILES, F, __UNCONST(C) }, 119#define NS_FILES_CB(F,C) { NSSRC_FILES, F, __UNCONST(C) },
120#define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, __UNCONST(C) }, 120#define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, __UNCONST(C) },
121  121
122#ifdef HESIOD 122#ifdef HESIOD
123# define NS_DNS_CB(F,C) { NSSRC_DNS, F, __UNCONST(C) }, 123# define NS_DNS_CB(F,C) { NSSRC_DNS, F, __UNCONST(C) },
124#else 124#else
125# define NS_DNS_CB(F,C) 125# define NS_DNS_CB(F,C)
126#endif 126#endif
127 127
128#ifdef YP 128#ifdef YP
129# define NS_NIS_CB(F,C) { NSSRC_NIS, F, __UNCONST(C) }, 129# define NS_NIS_CB(F,C) { NSSRC_NIS, F, __UNCONST(C) },
130#else 130#else
131# define NS_NIS_CB(F,C) 131# define NS_NIS_CB(F,C)
132#endif 132#endif
133#define NS_NULL_CB { .src = NULL }, 133#define NS_NULL_CB { .src = NULL },
134 134
135/* 135/*
136 * ns_src - `nsswitch source' 136 * ns_src - `nsswitch source'
137 * Used by the nsparser routines to store a mapping between a source 137 * Used by the nsparser routines to store a mapping between a source
138 * and its dispatch control flags for a given database. 138 * and its dispatch control flags for a given database.
139 */ 139 */
140typedef struct { 140typedef struct {
141 const char *name; 141 const char *name;
142 uint32_t flags; 142 uint32_t flags;
143} ns_src; 143} ns_src;
144 144
145 145
146/* 146/*
147 * Default sourcelists (if nsswitch.conf is missing, corrupt, 147 * Default sourcelists (if nsswitch.conf is missing, corrupt,
148 * or the requested database doesn't have an entry) 148 * or the requested database doesn't have an entry)
149 */ 149 */
150extern const ns_src __nsdefaultsrc[]; 150extern const ns_src __nsdefaultsrc[];
151extern const ns_src __nsdefaultcompat[]; 151extern const ns_src __nsdefaultcompat[];
152extern const ns_src __nsdefaultcompat_forceall[]; 152extern const ns_src __nsdefaultcompat_forceall[];
153extern const ns_src __nsdefaultfiles[]; 153extern const ns_src __nsdefaultfiles[];
154extern const ns_src __nsdefaultfiles_forceall[]; 154extern const ns_src __nsdefaultfiles_forceall[];
155extern const ns_src __nsdefaultnis[]; 155extern const ns_src __nsdefaultnis[];
156extern const ns_src __nsdefaultnis_forceall[]; 156extern const ns_src __nsdefaultnis_forceall[];
157 157
158 158
159/* 159/*
160 * ns_mtab - `nsswitch method table' 160 * ns_mtab - `nsswitch method table'
161 * An nsswitch module provides a mapping from (database name, method name) 161 * An nsswitch module provides a mapping from (database name, method name)
162 * tuples to the nss_method and associated callback data. Effectively, 162 * tuples to the nss_method and associated callback data. Effectively,
163 * ns_dtab, but used for dynamically loaded modules. 163 * ns_dtab, but used for dynamically loaded modules.
164 */ 164 */
165typedef struct { 165typedef struct {
166 const char *database; 166 const char *database;
167 const char *name; 167 const char *name;
168 nss_method method; 168 nss_method method;
169 void *mdata; 169 void *mdata;
170} ns_mtab; 170} ns_mtab;
171 171
172/* 172/*
173 * nss_module_register_fn - module registration function 173 * nss_module_register_fn - module registration function
174 * called at module load 174 * called at module load
175 * nss_module_unregister_fn - module un-registration function 175 * nss_module_unregister_fn - module un-registration function
176 * called at module unload 176 * called at module unload
177 */ 177 */
178typedef void (*nss_module_unregister_fn)(ns_mtab *, unsigned); 178typedef void (*nss_module_unregister_fn)(ns_mtab *, unsigned int);
179typedef ns_mtab *(*nss_module_register_fn)(const char *, unsigned *, 179typedef ns_mtab *(*nss_module_register_fn)(const char *, unsigned int *,
180 nss_module_unregister_fn *); 180 nss_module_unregister_fn *);
181 181
182#ifdef _NS_PRIVATE 182#ifdef _NS_PRIVATE
183 183
184/* 184/*
185 * Private data structures for back-end nsswitch implementation. 185 * Private data structures for back-end nsswitch implementation.
186 */ 186 */
187 187
188/* 188/*
189 * ns_dbt - `nsswitch database thang' 189 * ns_dbt - `nsswitch database thang'
190 * For each database in /etc/nsswitch.conf there is a ns_dbt, with its 190 * For each database in /etc/nsswitch.conf there is a ns_dbt, with its
191 * name and a list of ns_src's containing the source information. 191 * name and a list of ns_src's containing the source information.
192 */ 192 */
193typedef struct { 193typedef struct {
194 const char *name; /* name of database */ 194 const char *name; /* name of database */
195 ns_src *srclist; /* list of sources */ 195 ns_src *srclist; /* list of sources */
196 unsigned srclistsize; /* size of srclist */ 196 unsigned int srclistsize; /* size of srclist */
197} ns_dbt; 197} ns_dbt;
198 198
199/* 199/*
200 * ns_mod - `nsswitch module' 200 * ns_mod - `nsswitch module'
201 */ 201 */
202typedef struct { 202typedef struct {
203 const char *name; /* module name */ 203 const char *name; /* module name */
204 void *handle; /* handle from dlopen() */ 204 void *handle; /* handle from dlopen() */
205 ns_mtab *mtab; /* method table */ 205 ns_mtab *mtab; /* method table */
206 unsigned mtabsize; /* size of mtab */ 206 unsigned int mtabsize; /* size of mtab */
207 /* called to unload module */ 207 /* called to unload module */
208 nss_module_unregister_fn unregister; 208 nss_module_unregister_fn unregister;
209} ns_mod; 209} ns_mod;
210 210
211#endif /* _NS_PRIVATE */ 211#endif /* _NS_PRIVATE */
212 212
213 213
214#include <sys/cdefs.h> 214#include <sys/cdefs.h>
215 215
216__BEGIN_DECLS 216__BEGIN_DECLS
217int nsdispatch(void *, const ns_dtab [], const char *, 217int nsdispatch(void *, const ns_dtab [], const char *,
218 const char *, const ns_src [], ...); 218 const char *, const ns_src [], ...);
219 219
220#ifdef _NS_PRIVATE 220#ifdef _NS_PRIVATE
221int _nsdbtaddsrc(ns_dbt *, const ns_src *); 221int _nsdbtaddsrc(ns_dbt *, const ns_src *);
222void _nsdbtdump(const ns_dbt *); 222void _nsdbtdump(const ns_dbt *);
223int _nsdbtput(const ns_dbt *); 223int _nsdbtput(const ns_dbt *);
224void _nsyyerror(const char *); 224void _nsyyerror(const char *);
225int _nsyylex(void); 225int _nsyylex(void);
226#endif /* _NS_PRIVATE */ 226#endif /* _NS_PRIVATE */
227 227
228__END_DECLS 228__END_DECLS
229 229
230#endif /* !_NSSWITCH_H */ 230#endif /* !_NSSWITCH_H */

cvs diff -r1.12 -r1.13 src/include/login_cap.h (switch to unified diff)

--- src/include/login_cap.h 2016/01/22 21:55:57 1.12
+++ src/include/login_cap.h 2016/01/23 01:26:14 1.13
@@ -1,92 +1,92 @@ @@ -1,92 +1,92 @@
1/* $NetBSD: login_cap.h,v 1.12 2016/01/22 21:55:57 dholland Exp $ */ 1/* $NetBSD: login_cap.h,v 1.13 2016/01/23 01:26:14 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. 4 * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement: 15 * must display the following acknowledgement:
16 * This product includes software developed by Berkeley Software Design, 16 * This product includes software developed by Berkeley Software Design,
17 * Inc. 17 * Inc.
18 * 4. The name of Berkeley Software Design, Inc. may not be used to endorse 18 * 4. The name of Berkeley Software Design, Inc. may not be used to endorse
19 * or promote products derived from this software without specific prior 19 * or promote products derived from this software without specific prior
20 * written permission. 20 * written permission.
21 * 21 *
22 * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN, INC. ``AS IS'' AND 22 * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN, INC. ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN, INC. BE LIABLE 25 * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN, INC. BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 * 33 *
34 * BSDI login_cap.h,v 2.10 1997/08/07 21:35:19 prb Exp 34 * BSDI login_cap.h,v 2.10 1997/08/07 21:35:19 prb Exp
35 */ 35 */
36 36
37#ifndef _LOGIN_CAP_H_ 37#ifndef _LOGIN_CAP_H_
38#define _LOGIN_CAP_H_ 38#define _LOGIN_CAP_H_
39 39
40#define LOGIN_DEFCLASS "default" 40#define LOGIN_DEFCLASS "default"
41#define LOGIN_DEFSERVICE "login" 41#define LOGIN_DEFSERVICE "login"
42#define LOGIN_DEFUMASK 022 42#define LOGIN_DEFUMASK 022
43#define _PATH_LOGIN_CONF "/etc/login.conf" 43#define _PATH_LOGIN_CONF "/etc/login.conf"
44 44
45#define LOGIN_OSETGROUP 0x0001 /* Obsolete setgroup */ 45#define LOGIN_OSETGROUP 0x0001 /* Obsolete setgroup */
46#define LOGIN_SETLOGIN 0x0002 /* Set login */ 46#define LOGIN_SETLOGIN 0x0002 /* Set login */
47#define LOGIN_SETPATH 0x0004 /* Set path */ 47#define LOGIN_SETPATH 0x0004 /* Set path */
48#define LOGIN_SETPRIORITY 0x0008 /* Set priority */ 48#define LOGIN_SETPRIORITY 0x0008 /* Set priority */
49#define LOGIN_SETRESOURCES 0x0010 /* Set resource limits */ 49#define LOGIN_SETRESOURCES 0x0010 /* Set resource limits */
50#define LOGIN_SETUMASK 0x0020 /* Set umask */ 50#define LOGIN_SETUMASK 0x0020 /* Set umask */
51#define LOGIN_SETUSER 0x0040 /* Set user */ 51#define LOGIN_SETUSER 0x0040 /* Set user */
52#define LOGIN_SETENV 0x0080 /* Set user environment */ 52#define LOGIN_SETENV 0x0080 /* Set user environment */
53#define LOGIN_SETGID 0x0100 /* Set group id */ 53#define LOGIN_SETGID 0x0100 /* Set group id */
54#define LOGIN_SETGROUPS 0x0200 /* Set group membership (initgroups) */ 54#define LOGIN_SETGROUPS 0x0200 /* Set group membership (initgroups) */
55#define LOGIN_SETALL 0x03fe /* Set all. 0x0001 is obsolete! */ 55#define LOGIN_SETALL 0x03fe /* Set all. 0x0001 is obsolete! */
56#define LOGIN_SETGROUP (LOGIN_SETGID|LOGIN_SETGROUPS) /* Set group */ 56#define LOGIN_SETGROUP (LOGIN_SETGID|LOGIN_SETGROUPS) /* Set group */
57 57
58typedef struct { 58typedef struct {
59 char *lc_class; 59 char *lc_class;
60 char *lc_cap; 60 char *lc_cap;
61 char *lc_style; 61 char *lc_style;
62} login_cap_t; 62} login_cap_t;
63 63
64typedef int (*envfunc_t)(void *, const char *, const char *, int); 64typedef int (*envfunc_t)(void *, const char *, const char *, int);
65 65
66#include <sys/cdefs.h> 66#include <sys/cdefs.h>
67__BEGIN_DECLS 67__BEGIN_DECLS
68struct passwd; 68struct passwd;
69 69
70login_cap_t *login_getclass(const char *); 70login_cap_t *login_getclass(const char *);
71#ifndef __LIBC12_SOURCE__ 71#ifndef __LIBC12_SOURCE__
72login_cap_t *login_getpwclass(const struct passwd *) 72login_cap_t *login_getpwclass(const struct passwd *)
73 __RENAME(__login_getpwclass50); 73 __RENAME(__login_getpwclass50);
74#endif 74#endif
75void login_close(login_cap_t *); 75void login_close(login_cap_t *);
76int login_getcapbool(login_cap_t *, const char *, unsigned); 76int login_getcapbool(login_cap_t *, const char *, unsigned int);
77quad_t login_getcapnum(login_cap_t *, const char *, quad_t, quad_t); 77quad_t login_getcapnum(login_cap_t *, const char *, quad_t, quad_t);
78quad_t login_getcapsize(login_cap_t *, const char *, quad_t, quad_t); 78quad_t login_getcapsize(login_cap_t *, const char *, quad_t, quad_t);
79char *login_getcapstr(login_cap_t *, const char *, char *, char *); 79char *login_getcapstr(login_cap_t *, const char *, char *, char *);
80quad_t login_getcaptime(login_cap_t *, const char *, quad_t, quad_t); 80quad_t login_getcaptime(login_cap_t *, const char *, quad_t, quad_t);
81 81
82int setclasscontext(const char *, unsigned); 82int setclasscontext(const char *, unsigned int);
83#ifndef __LIBC12_SOURCE__ 83#ifndef __LIBC12_SOURCE__
84int setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned) 84int setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned int)
85 __RENAME(__setusercontext50); 85 __RENAME(__setusercontext50);
86#endif 86#endif
87void setuserpath(login_cap_t *, const char *, envfunc_t, void *); 87void setuserpath(login_cap_t *, const char *, envfunc_t, void *);
88int setuserenv(login_cap_t *, envfunc_t, void *); 88int setuserenv(login_cap_t *, envfunc_t, void *);
89 89
90__END_DECLS 90__END_DECLS
91 91
92#endif /* !_LOGIN_CAP_H_ */ 92#endif /* !_LOGIN_CAP_H_ */

cvs diff -r1.7 -r1.8 src/lib/libpci/pci.h (switch to unified diff)

--- src/lib/libpci/pci.h 2016/01/22 22:22:48 1.7
+++ src/lib/libpci/pci.h 2016/01/23 01:26:14 1.8
@@ -1,65 +1,67 @@ @@ -1,65 +1,67 @@
1/* $NetBSD: pci.h,v 1.7 2016/01/22 22:22:48 dholland Exp $ */ 1/* $NetBSD: pci.h,v 1.8 2016/01/23 01:26:14 dholland Exp $ */
2 2
3/* 3/*
4 * Copyright 2001 Wasabi Systems, Inc. 4 * Copyright 2001 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the 15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution. 16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software 17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement: 18 * must display the following acknowledgement:
19 * This product includes software developed for the NetBSD Project by 19 * This product includes software developed for the NetBSD Project by
20 * Wasabi Systems, Inc. 20 * Wasabi Systems, Inc.
21 * 4. The name of Wasabi Systems, Inc. may not be used to endorse 21 * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22 * or promote products derived from this software without specific prior 22 * or promote products derived from this software without specific prior
23 * written permission. 23 * written permission.
24 * 24 *
25 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 25 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE. 35 * POSSIBILITY OF SUCH DAMAGE.
36 */ 36 */
37 37
38#ifndef _PCI_H_ 38#ifndef _PCI_H_
39#define _PCI_H_ 39#define _PCI_H_
40 40
41#include <stddef.h> 41#include <stddef.h>
42#include <stdint.h> /* XXX */ 42#include <stdint.h> /* XXX */
43 43
44/* 44/*
45 * Interface to the PCI bus for user programs. 45 * Interface to the PCI bus for user programs.
46 */ 46 */
47 47
48typedef uint32_t pcireg_t; /* XXX */ 48typedef uint32_t pcireg_t; /* XXX */
49 49
50/* pci_bus.c */ 50/* pci_bus.c */
51int pcibus_conf_read(int, unsigned, unsigned, unsigned, unsigned, pcireg_t *); 51int pcibus_conf_read(int, unsigned int, unsigned int, unsigned int,
52int pcibus_conf_write(int, unsigned, unsigned, unsigned, unsigned, pcireg_t); 52 unsigned int, pcireg_t *);
 53int pcibus_conf_write(int, unsigned int, unsigned int, unsigned int,
 54 unsigned int, pcireg_t);
53 55
54/* pci_device.c */ 56/* pci_device.c */
55int pcidev_conf_read(int, unsigned, pcireg_t *); 57int pcidev_conf_read(int, unsigned int, pcireg_t *);
56int pcidev_conf_write(int, unsigned, pcireg_t); 58int pcidev_conf_write(int, unsigned int, pcireg_t);
57 59
58/* pci_drvname.c */ 60/* pci_drvname.c */
59int pci_drvname(int, unsigned, unsigned, char *, size_t); 61int pci_drvname(int, unsigned int, unsigned int, char *, size_t);
60 62
61/* pci_subr.c */ 63/* pci_subr.c */
62void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t); 64void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t);
63void pci_conf_print(int, unsigned, unsigned, unsigned); 65void pci_conf_print(int, unsigned int, unsigned int, unsigned int);
64 66
65#endif /* _PCI_H_ */ 67#endif /* _PCI_H_ */

cvs diff -r1.8 -r1.9 src/sys/fs/msdosfs/direntry.h (switch to unified diff)

--- src/sys/fs/msdosfs/direntry.h 2016/01/22 22:53:36 1.8
+++ src/sys/fs/msdosfs/direntry.h 2016/01/23 01:26:14 1.9
@@ -1,146 +1,146 @@ @@ -1,146 +1,146 @@
1/* $NetBSD: direntry.h,v 1.8 2016/01/22 22:53:36 dholland Exp $ */ 1/* $NetBSD: direntry.h,v 1.9 2016/01/23 01:26:14 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. 4 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
5 * Copyright (C) 1994, 1995, 1997 TooLs GmbH. 5 * Copyright (C) 1994, 1995, 1997 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below). 7 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the 15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution. 16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software 17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement: 18 * must display the following acknowledgement:
19 * This product includes software developed by TooLs GmbH. 19 * This product includes software developed by TooLs GmbH.
20 * 4. The name of TooLs GmbH may not be used to endorse or promote products 20 * 4. The name of TooLs GmbH may not be used to endorse or promote products
21 * derived from this software without specific prior written permission. 21 * derived from this software without specific prior written permission.
22 * 22 *
23 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 23 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
29 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
31 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 31 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
32 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34/* 34/*
35 * Written by Paul Popelka (paulp@uts.amdahl.com) 35 * Written by Paul Popelka (paulp@uts.amdahl.com)
36 * 36 *
37 * You can do anything you want with this software, just don't say you wrote 37 * You can do anything you want with this software, just don't say you wrote
38 * it, and don't remove this notice. 38 * it, and don't remove this notice.
39 * 39 *
40 * This software is provided "as is". 40 * This software is provided "as is".
41 * 41 *
42 * The author supplies this software to be publicly redistributed on the 42 * The author supplies this software to be publicly redistributed on the
43 * understanding that the author is not responsible for the correct 43 * understanding that the author is not responsible for the correct
44 * functioning of this software in any circumstances and is not liable for 44 * functioning of this software in any circumstances and is not liable for
45 * any damages caused by this software. 45 * any damages caused by this software.
46 * 46 *
47 * October 1992 47 * October 1992
48 */ 48 */
49#ifndef _MSDOSFS_DIRENTRY_H_ 49#ifndef _MSDOSFS_DIRENTRY_H_
50#define _MSDOSFS_DIRENTRY_H_ 50#define _MSDOSFS_DIRENTRY_H_
51 51
52/* 52/*
53 * Structure of a dos directory entry. 53 * Structure of a dos directory entry.
54 */ 54 */
55struct direntry { 55struct direntry {
56 uint8_t deName[8]; /* filename, blank filled */ 56 uint8_t deName[8]; /* filename, blank filled */
57#define SLOT_EMPTY 0x00 /* slot has never been used */ 57#define SLOT_EMPTY 0x00 /* slot has never been used */
58#define SLOT_E5 0x05 /* the real value is 0xe5 */ 58#define SLOT_E5 0x05 /* the real value is 0xe5 */
59#define SLOT_DELETED 0xe5 /* file in this slot deleted */ 59#define SLOT_DELETED 0xe5 /* file in this slot deleted */
60 uint8_t deExtension[3]; /* extension, blank filled */ 60 uint8_t deExtension[3]; /* extension, blank filled */
61 uint8_t deAttributes; /* file attributes */ 61 uint8_t deAttributes; /* file attributes */
62#define ATTR_NORMAL 0x00 /* normal file */ 62#define ATTR_NORMAL 0x00 /* normal file */
63#define ATTR_READONLY 0x01 /* file is readonly */ 63#define ATTR_READONLY 0x01 /* file is readonly */
64#define ATTR_HIDDEN 0x02 /* file is hidden */ 64#define ATTR_HIDDEN 0x02 /* file is hidden */
65#define ATTR_SYSTEM 0x04 /* file is a system file */ 65#define ATTR_SYSTEM 0x04 /* file is a system file */
66#define ATTR_VOLUME 0x08 /* entry is a volume label */ 66#define ATTR_VOLUME 0x08 /* entry is a volume label */
67#define ATTR_DIRECTORY 0x10 /* entry is a directory name */ 67#define ATTR_DIRECTORY 0x10 /* entry is a directory name */
68#define ATTR_ARCHIVE 0x20 /* file is new or modified */ 68#define ATTR_ARCHIVE 0x20 /* file is new or modified */
69 uint8_t deReserved; /* reserved */ 69 uint8_t deReserved; /* reserved */
70 uint8_t deCHundredth; /* hundredth of seconds in CTime */ 70 uint8_t deCHundredth; /* hundredth of seconds in CTime */
71 uint8_t deCTime[2]; /* create time */ 71 uint8_t deCTime[2]; /* create time */
72 uint8_t deCDate[2]; /* create date */ 72 uint8_t deCDate[2]; /* create date */
73 uint8_t deADate[2]; /* access date */ 73 uint8_t deADate[2]; /* access date */
74 uint8_t deHighClust[2]; /* high bytes of cluster number */ 74 uint8_t deHighClust[2]; /* high bytes of cluster number */
75 uint8_t deMTime[2]; /* last update time */ 75 uint8_t deMTime[2]; /* last update time */
76 uint8_t deMDate[2]; /* last update date */ 76 uint8_t deMDate[2]; /* last update date */
77 uint8_t deStartCluster[2]; /* starting cluster of file */ 77 uint8_t deStartCluster[2]; /* starting cluster of file */
78 uint8_t deFileSize[4]; /* size of file in bytes */ 78 uint8_t deFileSize[4]; /* size of file in bytes */
79}; 79};
80 80
81static __inline uint8_t 81static __inline uint8_t
82msdos_dirchar(const struct direntry *de, size_t i) { 82msdos_dirchar(const struct direntry *de, size_t i) {
83 return i < sizeof(de->deName) ? de->deName[i] : 83 return i < sizeof(de->deName) ? de->deName[i] :
84 de->deExtension[i - sizeof(de->deName)]; 84 de->deExtension[i - sizeof(de->deName)];
85} 85}
86 86
87/* 87/*
88 * Structure of a Win95 long name directory entry 88 * Structure of a Win95 long name directory entry
89 */ 89 */
90struct winentry { 90struct winentry {
91 uint8_t weCnt; 91 uint8_t weCnt;
92#define WIN_LAST 0x40 92#define WIN_LAST 0x40
93#define WIN_CNT 0x3f 93#define WIN_CNT 0x3f
94 uint8_t wePart1[10]; 94 uint8_t wePart1[10];
95 uint8_t weAttributes; 95 uint8_t weAttributes;
96#define ATTR_WIN95 0x0f 96#define ATTR_WIN95 0x0f
97 uint8_t weReserved1; 97 uint8_t weReserved1;
98 uint8_t weChksum; 98 uint8_t weChksum;
99 uint8_t wePart2[12]; 99 uint8_t wePart2[12];
100 uint16_t weReserved2; 100 uint16_t weReserved2;
101 uint8_t wePart3[4]; 101 uint8_t wePart3[4];
102}; 102};
103#define WIN_CHARS 13 /* Number of chars per winentry */ 103#define WIN_CHARS 13 /* Number of chars per winentry */
104 104
105/* 105/*
106 * This is the format of the contents of the deTime field in the direntry 106 * This is the format of the contents of the deTime field in the direntry
107 * structure. 107 * structure.
108 * We don't use bitfields because we don't know how compilers for 108 * We don't use bitfields because we don't know how compilers for
109 * arbitrary machines will lay them out. 109 * arbitrary machines will lay them out.
110 */ 110 */
111#define DT_2SECONDS_MASK 0x1F /* seconds divided by 2 */ 111#define DT_2SECONDS_MASK 0x1F /* seconds divided by 2 */
112#define DT_2SECONDS_SHIFT 0 112#define DT_2SECONDS_SHIFT 0
113#define DT_MINUTES_MASK 0x7E0 /* minutes */ 113#define DT_MINUTES_MASK 0x7E0 /* minutes */
114#define DT_MINUTES_SHIFT 5 114#define DT_MINUTES_SHIFT 5
115#define DT_HOURS_MASK 0xF800 /* hours */ 115#define DT_HOURS_MASK 0xF800 /* hours */
116#define DT_HOURS_SHIFT 11 116#define DT_HOURS_SHIFT 11
117 117
118/* 118/*
119 * This is the format of the contents of the deDate field in the direntry 119 * This is the format of the contents of the deDate field in the direntry
120 * structure. 120 * structure.
121 */ 121 */
122#define DD_DAY_MASK 0x1F /* day of month */ 122#define DD_DAY_MASK 0x1F /* day of month */
123#define DD_DAY_SHIFT 0 123#define DD_DAY_SHIFT 0
124#define DD_MONTH_MASK 0x1E0 /* month */ 124#define DD_MONTH_MASK 0x1E0 /* month */
125#define DD_MONTH_SHIFT 5 125#define DD_MONTH_SHIFT 5
126#define DD_YEAR_MASK 0xFE00 /* year - 1980 */ 126#define DD_YEAR_MASK 0xFE00 /* year - 1980 */
127#define DD_YEAR_SHIFT 9 127#define DD_YEAR_SHIFT 9
128 128
129#if defined(_KERNEL) || defined(MAKEFS) 129#if defined(_KERNEL) || defined(MAKEFS)
130struct dirent; 130struct dirent;
131void unix2dostime(const struct timespec *tsp, int gmtoff, uint16_t *ddp, 131void unix2dostime(const struct timespec *tsp, int gmtoff, uint16_t *ddp,
132 uint16_t *dtp, uint8_t *dhp); 132 uint16_t *dtp, uint8_t *dhp);
133void dos2unixtime(unsigned dd, unsigned dt, unsigned dh, int gmtoff, 133void dos2unixtime(unsigned int dd, unsigned int dt, unsigned int dh,
134 struct timespec *tsp); 134 int gmtoff, struct timespec *tsp);
135int dos2unixfn(unsigned char dn[11], unsigned char *un, int lower); 135int dos2unixfn(unsigned char dn[11], unsigned char *un, int lower);
136int unix2dosfn(const unsigned char *un, unsigned char dn[12], int unlen, 136int unix2dosfn(const unsigned char *un, unsigned char dn[12], int unlen,
137 unsigned gen); 137 unsigned int gen);
138int unix2winfn(const unsigned char *un, int unlen, struct winentry *wep, 138int unix2winfn(const unsigned char *un, int unlen, struct winentry *wep,
139 int cnt, int chksum); 139 int cnt, int chksum);
140int winChkName(const unsigned char *un, int unlen, struct winentry *wep, 140int winChkName(const unsigned char *un, int unlen, struct winentry *wep,
141 int chksum); 141 int chksum);
142int win2unixfn(struct winentry *wep, struct dirent *dp, int chksum); 142int win2unixfn(struct winentry *wep, struct dirent *dp, int chksum);
143uint8_t winChksum(uint8_t *name); 143uint8_t winChksum(uint8_t *name);
144int winSlotCnt(const unsigned char *un, int unlen); 144int winSlotCnt(const unsigned char *un, int unlen);
145#endif /* _KERNEL || MAKEFS */ 145#endif /* _KERNEL || MAKEFS */
146#endif /* _MSDOSFS_DIRENTRY_H_ */ 146#endif /* _MSDOSFS_DIRENTRY_H_ */

cvs diff -r1.35 -r1.36 src/sys/sys/envsys.h (switch to unified diff)

--- src/sys/sys/envsys.h 2016/01/22 23:33:42 1.35
+++ src/sys/sys/envsys.h 2016/01/23 01:26:14 1.36
@@ -1,198 +1,198 @@ @@ -1,198 +1,198 @@
1/* $NetBSD: envsys.h,v 1.35 2016/01/22 23:33:42 dholland Exp $ */ 1/* $NetBSD: envsys.h,v 1.36 2016/01/23 01:26:14 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.
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the 16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution. 17 * documentation and/or other materials provided with the distribution.
18 * 18 *
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#ifndef _SYS_ENVSYS_H_ 32#ifndef _SYS_ENVSYS_H_
33#define _SYS_ENVSYS_H_ 33#define _SYS_ENVSYS_H_
34 34
35#ifndef _KERNEL 35#ifndef _KERNEL
36#include <stdbool.h> 36#include <stdbool.h>
37#endif 37#endif
38 38
39#include <sys/ioccom.h> 39#include <sys/ioccom.h>
40#include <sys/power.h> 40#include <sys/power.h>
41#include <sys/queue.h> 41#include <sys/queue.h>
42 42
43/* 43/*
44 * ENVironmental SYStem version 2 (aka ENVSYS 2) 44 * ENVironmental SYStem version 2 (aka ENVSYS 2)
45 */ 45 */
46 46
47#define ENVSYS_MAXSENSORS 512 47#define ENVSYS_MAXSENSORS 512
48#define ENVSYS_DESCLEN 32 48#define ENVSYS_DESCLEN 32
49 49
50/* sensor units */ 50/* sensor units */
51enum envsys_units { 51enum envsys_units {
52 ENVSYS_STEMP = 0, /* Temperature (microkelvins) */ 52 ENVSYS_STEMP = 0, /* Temperature (microkelvins) */
53 ENVSYS_SFANRPM, /* Fan RPM */ 53 ENVSYS_SFANRPM, /* Fan RPM */
54 ENVSYS_SVOLTS_AC, /* AC Volts */ 54 ENVSYS_SVOLTS_AC, /* AC Volts */
55 ENVSYS_SVOLTS_DC, /* DC Volts */ 55 ENVSYS_SVOLTS_DC, /* DC Volts */
56 ENVSYS_SOHMS, /* Ohms */ 56 ENVSYS_SOHMS, /* Ohms */
57 ENVSYS_SWATTS, /* Watts */ 57 ENVSYS_SWATTS, /* Watts */
58 ENVSYS_SAMPS, /* Ampere */ 58 ENVSYS_SAMPS, /* Ampere */
59 ENVSYS_SWATTHOUR, /* Watt hour */ 59 ENVSYS_SWATTHOUR, /* Watt hour */
60 ENVSYS_SAMPHOUR, /* Ampere hour */ 60 ENVSYS_SAMPHOUR, /* Ampere hour */
61 ENVSYS_INDICATOR, /* Indicator */ 61 ENVSYS_INDICATOR, /* Indicator */
62 ENVSYS_INTEGER, /* Integer */ 62 ENVSYS_INTEGER, /* Integer */
63 ENVSYS_DRIVE, /* Drive */ 63 ENVSYS_DRIVE, /* Drive */
64 ENVSYS_BATTERY_CAPACITY, /* Battery capacity */ 64 ENVSYS_BATTERY_CAPACITY, /* Battery capacity */
65 ENVSYS_BATTERY_CHARGE, /* Battery charging/discharging */ 65 ENVSYS_BATTERY_CHARGE, /* Battery charging/discharging */
66 ENVSYS_SRELHUMIDITY, /* relative humidity */ 66 ENVSYS_SRELHUMIDITY, /* relative humidity */
67 ENVSYS_NSENSORS 67 ENVSYS_NSENSORS
68}; 68};
69 69
70/* sensor states */ 70/* sensor states */
71enum envsys_states { 71enum envsys_states {
72 ENVSYS_SVALID = 10, /* sensor state is valid */ 72 ENVSYS_SVALID = 10, /* sensor state is valid */
73 ENVSYS_SINVALID, /* sensor state is invalid */ 73 ENVSYS_SINVALID, /* sensor state is invalid */
74 ENVSYS_SCRITICAL, /* sensor state is critical */ 74 ENVSYS_SCRITICAL, /* sensor state is critical */
75 ENVSYS_SCRITUNDER, /* sensor state is critical under */ 75 ENVSYS_SCRITUNDER, /* sensor state is critical under */
76 ENVSYS_SCRITOVER, /* sensor state is critical over */ 76 ENVSYS_SCRITOVER, /* sensor state is critical over */
77 ENVSYS_SWARNUNDER, /* sensor state is warn under */ 77 ENVSYS_SWARNUNDER, /* sensor state is warn under */
78 ENVSYS_SWARNOVER /* sensor state is warn over */ 78 ENVSYS_SWARNOVER /* sensor state is warn over */
79}; 79};
80 80
81/* sensor drive states */ 81/* sensor drive states */
82enum envsys_drive_states { 82enum envsys_drive_states {
83 ENVSYS_DRIVE_EMPTY = 1, /* drive is empty */ 83 ENVSYS_DRIVE_EMPTY = 1, /* drive is empty */
84 ENVSYS_DRIVE_READY, /* drive is ready */ 84 ENVSYS_DRIVE_READY, /* drive is ready */
85 ENVSYS_DRIVE_POWERUP, /* drive is powered up */ 85 ENVSYS_DRIVE_POWERUP, /* drive is powered up */
86 ENVSYS_DRIVE_ONLINE, /* drive is online */ 86 ENVSYS_DRIVE_ONLINE, /* drive is online */
87 ENVSYS_DRIVE_IDLE, /* drive is idle */ 87 ENVSYS_DRIVE_IDLE, /* drive is idle */
88 ENVSYS_DRIVE_ACTIVE, /* drive is active */ 88 ENVSYS_DRIVE_ACTIVE, /* drive is active */
89 ENVSYS_DRIVE_REBUILD, /* drive is rebuilding */ 89 ENVSYS_DRIVE_REBUILD, /* drive is rebuilding */
90 ENVSYS_DRIVE_POWERDOWN, /* drive is powered down */ 90 ENVSYS_DRIVE_POWERDOWN, /* drive is powered down */
91 ENVSYS_DRIVE_FAIL, /* drive failed */ 91 ENVSYS_DRIVE_FAIL, /* drive failed */
92 ENVSYS_DRIVE_PFAIL, /* drive is degraded */ 92 ENVSYS_DRIVE_PFAIL, /* drive is degraded */
93 ENVSYS_DRIVE_MIGRATING, /* drive is migrating */ 93 ENVSYS_DRIVE_MIGRATING, /* drive is migrating */
94 ENVSYS_DRIVE_OFFLINE, /* drive is offline */ 94 ENVSYS_DRIVE_OFFLINE, /* drive is offline */
95 ENVSYS_DRIVE_BUILD, /* drive is building */ 95 ENVSYS_DRIVE_BUILD, /* drive is building */
96 ENVSYS_DRIVE_CHECK /* drive is checking its state */ 96 ENVSYS_DRIVE_CHECK /* drive is checking its state */
97}; 97};
98 98
99/* sensor battery capacity states */ 99/* sensor battery capacity states */
100enum envsys_battery_capacity_states { 100enum envsys_battery_capacity_states {
101 ENVSYS_BATTERY_CAPACITY_NORMAL = 1, /* normal cap in battery */ 101 ENVSYS_BATTERY_CAPACITY_NORMAL = 1, /* normal cap in battery */
102 ENVSYS_BATTERY_CAPACITY_WARNING, /* warning cap in battery */ 102 ENVSYS_BATTERY_CAPACITY_WARNING, /* warning cap in battery */
103 ENVSYS_BATTERY_CAPACITY_CRITICAL, /* critical cap in battery */ 103 ENVSYS_BATTERY_CAPACITY_CRITICAL, /* critical cap in battery */
104 ENVSYS_BATTERY_CAPACITY_HIGH, /* high cap in battery */ 104 ENVSYS_BATTERY_CAPACITY_HIGH, /* high cap in battery */
105 ENVSYS_BATTERY_CAPACITY_MAX, /* maximum cap in battery */ 105 ENVSYS_BATTERY_CAPACITY_MAX, /* maximum cap in battery */
106 ENVSYS_BATTERY_CAPACITY_LOW /* low cap in battery */ 106 ENVSYS_BATTERY_CAPACITY_LOW /* low cap in battery */
107}; 107};
108 108
109/* sensor indicator states */ 109/* sensor indicator states */
110enum envsys_indicator_states { 110enum envsys_indicator_states {
111 ENVSYS_INDICATOR_FALSE = 0, 111 ENVSYS_INDICATOR_FALSE = 0,
112 ENVSYS_INDICATOR_TRUE = 1 112 ENVSYS_INDICATOR_TRUE = 1
113}; 113};
114 114
115/* 115/*
116 * IOCTLs 116 * IOCTLs
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
129struct envsys_tre_data { 129struct envsys_tre_data {
130 unsigned sensor; 130 unsigned int 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 unsigned units; /* type of sensor */ 139 unsigned int units; /* type of sensor */
140}; 140};
141typedef struct envsys_tre_data envsys_tre_data_t; 141typedef 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
153#define ENVSYS_DRIVE_POWERUP 3 153#define ENVSYS_DRIVE_POWERUP 3
154#define ENVSYS_DRIVE_ONLINE 4 154#define ENVSYS_DRIVE_ONLINE 4
155#define ENVSYS_DRIVE_IDLE 5 155#define ENVSYS_DRIVE_IDLE 5
156#define ENVSYS_DRIVE_ACTIVE 6 156#define ENVSYS_DRIVE_ACTIVE 6
157#define ENVSYS_DRIVE_REBUILD 7 157#define ENVSYS_DRIVE_REBUILD 7
158#define ENVSYS_DRIVE_POWERDOWN 8 158#define ENVSYS_DRIVE_POWERDOWN 8
159#define ENVSYS_DRIVE_FAIL 9 159#define ENVSYS_DRIVE_FAIL 9
160#define ENVSYS_DRIVE_PFAIL 10 160#define ENVSYS_DRIVE_PFAIL 10
161 161
162#ifdef ENVSYSUNITNAMES 162#ifdef ENVSYSUNITNAMES
163static const char * const envsysunitnames[] = { 163static const char * const envsysunitnames[] = {
164 "degC", "RPM", "VAC", "V", "Ohms", "W", 164 "degC", "RPM", "VAC", "V", "Ohms", "W",
165 "A", "Wh", "Ah", "bool", "integer", "drive", "%rH", "Unk" 165 "A", "Wh", "Ah", "bool", "integer", "drive", "%rH", "Unk"
166}; 166};
167static const char * const envsysdrivestatus[] = { 167static const char * const envsysdrivestatus[] = {
168 "unknown", "empty", "ready", "powering up", "online", "idle", "active", 168 "unknown", "empty", "ready", "powering up", "online", "idle", "active",
169 "rebuilding", "powering down", "failed", "degraded" 169 "rebuilding", "powering down", "failed", "degraded"
170}; 170};
171#endif 171#endif
172 172
173 173
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
186struct envsys_basic_info { 186struct envsys_basic_info {
187 unsigned sensor; /* sensor number */ 187 unsigned int sensor; /* sensor number */
188 unsigned units; /* type of sensor */ 188 unsigned int units; /* type of sensor */
189 char desc[33]; /* sensor description */ 189 char desc[33]; /* sensor description */
190 unsigned rfact; /* for volts, (int)(factor x 10^4) */ 190 unsigned int rfact; /* for volts, (int)(factor x 10^4) */
191 unsigned rpms; /* for fans, set nominal RPMs */ 191 unsigned int rpms; /* for fans, set nominal RPMs */
192 uint32_t validflags; /* sensor valid flags */ 192 uint32_t validflags; /* sensor valid flags */
193}; 193};
194typedef struct envsys_basic_info envsys_basic_info_t; 194typedef 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_ */

cvs diff -r1.5 -r1.6 src/sys/sys/fdio.h (switch to unified diff)

--- src/sys/sys/fdio.h 2016/01/22 23:35:18 1.5
+++ src/sys/sys/fdio.h 2016/01/23 01:26:14 1.6
@@ -1,84 +1,84 @@ @@ -1,84 +1,84 @@
1/* $NetBSD: fdio.h,v 1.5 2016/01/22 23:35:18 dholland Exp $ */ 1/* $NetBSD: fdio.h,v 1.6 2016/01/23 01:26:14 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. 4 * Copyright (c) 1996, 1997 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 John Kohl. 8 * by John Kohl.
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.
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the 16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution. 17 * documentation and/or other materials provided with the distribution.
18 * 18 *
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#ifndef _SYS_FDIO_H_ 32#ifndef _SYS_FDIO_H_
33#define _SYS_FDIO_H_ 33#define _SYS_FDIO_H_
34 34
35#include <sys/ioccom.h> 35#include <sys/ioccom.h>
36 36
37/* Floppy diskette definitions */ 37/* Floppy diskette definitions */
38 38
39enum fdformat_result { 39enum fdformat_result {
40 FDFORMAT_SUCCESS, 40 FDFORMAT_SUCCESS,
41 FDFORMAT_MEDIA_ERROR, /* hardware reported a formatting 41 FDFORMAT_MEDIA_ERROR, /* hardware reported a formatting
42 error */ 42 error */
43 FDFORMAT_CONFIG_ERROR /* something bogus in parameters */ 43 FDFORMAT_CONFIG_ERROR /* something bogus in parameters */
44}; 44};
45 45
46#define FDFORMAT_VERSION 19961120 46#define FDFORMAT_VERSION 19961120
47 47
48struct fdformat_cmd { 48struct fdformat_cmd {
49 unsigned formatcmd_version; /* FDFORMAT_VERSION */ 49 unsigned int formatcmd_version; /* FDFORMAT_VERSION */
50 int head; /* IN */ 50 int head; /* IN */
51 int cylinder; /* IN */ 51 int cylinder; /* IN */
52}; 52};
53 53
54struct fdformat_parms { 54struct fdformat_parms {
55/* list of items taken from i386 formatting glop (NEC 765); 55/* list of items taken from i386 formatting glop (NEC 765);
56 should be made the union of support needed for other devices. */ 56 should be made the union of support needed for other devices. */
57 unsigned fdformat_version; /* rev this when needed; write drivers to 57 unsigned int fdformat_version;/* rev this when needed; write drivers to
58 allow forward compatibility, please, 58 allow forward compatibility, please,
59 and add elements to the end of the 59 and add elements to the end of the
60 structure */ 60 structure */
61 unsigned nbps; /* number of bytes per sector */ 61 unsigned int nbps; /* number of bytes per sector */
62 unsigned ncyl; /* number of cylinders */ 62 unsigned int ncyl; /* number of cylinders */
63 unsigned nspt; /* sectors per track */ 63 unsigned int nspt; /* sectors per track */
64 unsigned ntrk; /* number of heads/tracks per cyl */ 64 unsigned int ntrk; /* number of heads/tracks per cyl */
65 unsigned stepspercyl; /* steps per cylinder */ 65 unsigned int stepspercyl; /* steps per cylinder */
66 unsigned gaplen; /* formatting gap length */ 66 unsigned int gaplen; /* formatting gap length */
67 unsigned fillbyte; /* formatting fill byte */ 67 unsigned int fillbyte; /* formatting fill byte */
68 unsigned xfer_rate; /* in bits per second; driver 68 unsigned int xfer_rate; /* in bits per second; driver
69 must convert */ 69 must convert */
70 unsigned interleave; /* interleave factor */ 70 unsigned int interleave; /* interleave factor */
71}; 71};
72 72
73 73
74#define FDOPT_NORETRY 0x0001 /* no retries on failure (cleared on close) */ 74#define FDOPT_NORETRY 0x0001 /* no retries on failure (cleared on close) */
75#define FDOPT_SILENT 0x0002 /* no error messages (cleared on close) */ 75#define FDOPT_SILENT 0x0002 /* no error messages (cleared on close) */
76 76
77#define FDIOCGETOPTS _IOR('d', 114, int) /* drive options, see previous */ 77#define FDIOCGETOPTS _IOR('d', 114, int) /* drive options, see previous */
78#define FDIOCSETOPTS _IOW('d', 115, int) 78#define FDIOCSETOPTS _IOW('d', 115, int)
79 79
80#define FDIOCSETFORMAT _IOW('d', 116, struct fdformat_parms) /* set format parms */ 80#define FDIOCSETFORMAT _IOW('d', 116, struct fdformat_parms) /* set format parms */
81#define FDIOCGETFORMAT _IOR('d', 117, struct fdformat_parms) /* get format parms */ 81#define FDIOCGETFORMAT _IOR('d', 117, struct fdformat_parms) /* get format parms */
82#define FDIOCFORMAT_TRACK _IOW('d', 118, struct fdformat_cmd) /* do it */ 82#define FDIOCFORMAT_TRACK _IOW('d', 118, struct fdformat_cmd) /* do it */
83 83
84#endif /* _SYS_FDIO_H_ */ 84#endif /* _SYS_FDIO_H_ */

cvs diff -r1.4 -r1.5 src/sys/sys/wdog.h (switch to unified diff)

--- src/sys/sys/wdog.h 2016/01/22 23:47:04 1.4
+++ src/sys/sys/wdog.h 2016/01/23 01:26:14 1.5
@@ -1,109 +1,109 @@ @@ -1,109 +1,109 @@
1/* $NetBSD: wdog.h,v 1.4 2016/01/22 23:47:04 dholland Exp $ */ 1/* $NetBSD: wdog.h,v 1.5 2016/01/23 01:26:14 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2000 Zembu Labs, Inc. 4 * Copyright (c) 2000 Zembu Labs, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Author: Jason R. Thorpe <thorpej@zembu.com> 7 * Author: Jason R. Thorpe <thorpej@zembu.com>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the 15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution. 16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software 17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement: 18 * must display the following acknowledgement:
19 * This product includes software developed by Zembu Labs, Inc. 19 * This product includes software developed by Zembu Labs, Inc.
20 * 4. Neither the name of Zembu Labs nor the names of its employees may 20 * 4. Neither the name of Zembu Labs nor the names of its employees may
21 * be used to endorse or promote products derived from this software 21 * be used to endorse or promote products derived from this software
22 * without specific prior written permission. 22 * without specific prior written permission.
23 * 23 *
24 * THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS 24 * THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS
25 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR- 25 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR-
26 * RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS- 26 * RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
27 * CLAIMED. IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 * CLAIMED. IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36#ifndef _SYS_WDOG_H_ 36#ifndef _SYS_WDOG_H_
37#define _SYS_WDOG_H_ 37#define _SYS_WDOG_H_
38 38
39#include <sys/ioccom.h> 39#include <sys/ioccom.h>
40 40
41/* 41/*
42 * Definitions for manipulating watchdog timers. 42 * Definitions for manipulating watchdog timers.
43 */ 43 */
44 44
45/* This must match struct device's "dv_xname" size. */ 45/* This must match struct device's "dv_xname" size. */
46#define WDOG_NAMESIZE 16 46#define WDOG_NAMESIZE 16
47 47
48struct wdog_mode { 48struct wdog_mode {
49 char wm_name[WDOG_NAMESIZE]; 49 char wm_name[WDOG_NAMESIZE];
50 int wm_mode; /* timer mode */ 50 int wm_mode; /* timer mode */
51 unsigned wm_period; /* timer period (seconds) */ 51 unsigned int wm_period; /* timer period (seconds) */
52}; 52};
53 53
54/* 54/*
55 * GMODE -- get mode of watchdog specified by wm_name. 55 * GMODE -- get mode of watchdog specified by wm_name.
56 * 56 *
57 * SMODE -- set mode of watchdog specified by wm_mame. If 57 * SMODE -- set mode of watchdog specified by wm_mame. If
58 * wm_mode is not DISARMED, the watchdog is armed, 58 * wm_mode is not DISARMED, the watchdog is armed,
59 * if another watchdog is not already running. 59 * if another watchdog is not already running.
60 */ 60 */
61#define WDOGIOC_GMODE _IOWR('w', 0, struct wdog_mode) 61#define WDOGIOC_GMODE _IOWR('w', 0, struct wdog_mode)
62#define WDOGIOC_SMODE _IOW('w', 1, struct wdog_mode) 62#define WDOGIOC_SMODE _IOW('w', 1, struct wdog_mode)
63 63
64/* 64/*
65 * WHICH -- returns the mode information of the currently armed 65 * WHICH -- returns the mode information of the currently armed
66 * watchdog timer. 66 * watchdog timer.
67 */ 67 */
68#define WDOGIOC_WHICH _IOR('w', 2, struct wdog_mode) 68#define WDOGIOC_WHICH _IOR('w', 2, struct wdog_mode)
69 69
70/* 70/*
71 * TICKLE -- tickle the currently armed watchdog timer if the 71 * TICKLE -- tickle the currently armed watchdog timer if the
72 * mode of that timer is UTICKLE. 72 * mode of that timer is UTICKLE.
73 */ 73 */
74#define WDOGIOC_TICKLE _IO('w', 3) 74#define WDOGIOC_TICKLE _IO('w', 3)
75 75
76/* 76/*
77 * GTICKLER -- get the PID of the last process to tickle the timer. 77 * GTICKLER -- get the PID of the last process to tickle the timer.
78 */ 78 */
79#define WDOGIOC_GTICKLER _IOR('w', 4, pid_t) 79#define WDOGIOC_GTICKLER _IOR('w', 4, pid_t)
80 80
81/* 81/*
82 * GWDOGS -- fill in the character array with the names of all of 82 * GWDOGS -- fill in the character array with the names of all of
83 * the watchdog timers present on the system. The names 83 * the watchdog timers present on the system. The names
84 * will be padded out to WDOG_NAMESIZE. Thus, the argument 84 * will be padded out to WDOG_NAMESIZE. Thus, the argument
85 * should be (count * WDOG_NAMESIZE) bytes long. 85 * should be (count * WDOG_NAMESIZE) bytes long.
86 */ 86 */
87struct wdog_conf { 87struct wdog_conf {
88 char *wc_names; 88 char *wc_names;
89 int wc_count; 89 int wc_count;
90}; 90};
91#define WDOGIOC_GWDOGS _IOWR('w', 5, struct wdog_conf) 91#define WDOGIOC_GWDOGS _IOWR('w', 5, struct wdog_conf)
92 92
93#define WDOG_MODE_DISARMED 0 /* watchdog is disarmed */ 93#define WDOG_MODE_DISARMED 0 /* watchdog is disarmed */
94#define WDOG_MODE_KTICKLE 1 /* kernel tickles watchdog */ 94#define WDOG_MODE_KTICKLE 1 /* kernel tickles watchdog */
95#define WDOG_MODE_UTICKLE 2 /* user tickles watchdog */ 95#define WDOG_MODE_UTICKLE 2 /* user tickles watchdog */
96#define WDOG_MODE_ETICKLE 3 /* external program tickles watchdog */ 96#define WDOG_MODE_ETICKLE 3 /* external program tickles watchdog */
97 97
98#define WDOG_MODE_MASK 0x03 98#define WDOG_MODE_MASK 0x03
99 99
100#define WDOG_FEATURE_ALARM 0x10 /* enable audible alarm on expire */ 100#define WDOG_FEATURE_ALARM 0x10 /* enable audible alarm on expire */
101 101
102#define WDOG_FEATURE_MASK 0x10 102#define WDOG_FEATURE_MASK 0x10
103 103
104#define WDOG_PERIOD_DEFAULT ((u_int)-1) 104#define WDOG_PERIOD_DEFAULT ((u_int)-1)
105 105
106/* Period is expressed in seconds. */ 106/* Period is expressed in seconds. */
107#define WDOG_PERIOD_TO_TICKS(period) ((period) * hz) 107#define WDOG_PERIOD_TO_TICKS(period) ((period) * hz)
108 108
109#endif /* _SYS_WDOG_H_ */ 109#endif /* _SYS_WDOG_H_ */