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 (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
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

cvs diff -r1.22 -r1.23 src/include/link_aout.h (expand / 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 (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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.
@@ -165,55 +165,55 @@ extern const ns_src __nsdefaultnis_force @@ -165,55 +165,55 @@ extern const ns_src __nsdefaultnis_force
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

cvs diff -r1.12 -r1.13 src/include/login_cap.h (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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
@@ -63,30 +63,30 @@ typedef struct { @@ -63,30 +63,30 @@ typedef struct {
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 (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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
@@ -38,28 +38,30 @@ @@ -38,28 +38,30 @@
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 (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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
@@ -120,27 +120,27 @@ struct winentry { @@ -120,27 +120,27 @@ struct winentry {
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 (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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.
@@ -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
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
@@ -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
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 (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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.
@@ -36,48 +36,48 @@ @@ -36,48 +36,48 @@
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

cvs diff -r1.4 -r1.5 src/sys/sys/wdog.h (expand / 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,14 +1,14 @@ @@ -1,14 +1,14 @@
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
@@ -38,27 +38,27 @@ @@ -38,27 +38,27 @@
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/*