CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Fri Jul 3 19:00:01 UTC 2020 Modified Files: src/sys/compat/sys: statvfs.h Log Message: sync with mount.h, always use the structure size. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/compat/sys/statvfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/statvfs.h diff -u src/sys/compat/sys/statvfs.h:1.2 src/sys/compat/sys/statvfs.h:1.3 --- src/sys/compat/sys/statvfs.h:1.2 Fri Jul 3 10:08:53 2020 +++ src/sys/compat/sys/statvfs.h Fri Jul 3 15:00:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: statvfs.h,v 1.2 2020/07/03 14:08:53 christos Exp $ */ +/* $NetBSD: statvfs.h,v 1.3 2020/07/03 19:00:01 christos Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -116,7 +116,7 @@ statvfs_to_statvfs90_copy(const void *vs int error; statvfs_to_statvfs90(vs, s90); - error = copyout(s90, vs90, l); + error = copyout(s90, vs90, sizeof(*s90)); kmem_free(s90, sizeof(*s90)); return error;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: jdolecek Date: Fri Jul 3 18:49:38 UTC 2020 Modified Files: src/sys/compat/sys: mount.h Log Message: don't overallocate (follows similar change to compat/sys/statvfs.h) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/compat/sys/mount.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/mount.h diff -u src/sys/compat/sys/mount.h:1.13 src/sys/compat/sys/mount.h:1.14 --- src/sys/compat/sys/mount.h:1.13 Sat Jun 27 15:49:30 2020 +++ src/sys/compat/sys/mount.h Fri Jul 3 18:49:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.13 2020/06/27 15:49:30 christos Exp $ */ +/* $NetBSD: mount.h,v 1.14 2020/07/03 18:49:37 jdolecek Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -137,12 +137,12 @@ statvfs_to_statfs12(const struct statvfs static __inline int statvfs_to_statfs12_copy(const void *vs, void *vs12, size_t l) { - struct statfs12 *s12 = STATVFSBUF_GET(); + struct statfs12 *s12 = kmem_zalloc(sizeof(*s12), KM_SLEEP); int error; statvfs_to_statfs12(vs, s12); error = copyout(s12, vs12, sizeof(*s12)); - STATVFSBUF_PUT(s12); + kmem_free(s12, sizeof(*s12)); return error; }
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Fri Jul 3 14:08:53 UTC 2020 Modified Files: src/sys/compat/sys: statvfs.h Log Message: don't overallocate (requested by maxv@) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/sys/statvfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/statvfs.h diff -u src/sys/compat/sys/statvfs.h:1.1 src/sys/compat/sys/statvfs.h:1.2 --- src/sys/compat/sys/statvfs.h:1.1 Sun Sep 22 19:18:53 2019 +++ src/sys/compat/sys/statvfs.h Fri Jul 3 10:08:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: statvfs.h,v 1.1 2019/09/22 23:18:53 christos Exp $ */ +/* $NetBSD: statvfs.h,v 1.2 2020/07/03 14:08:53 christos Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -112,12 +112,12 @@ statvfs_to_statvfs90(const struct statvf static __inline int statvfs_to_statvfs90_copy(const void *vs, void *vs90, size_t l) { - struct statvfs90 *s90 = STATVFSBUF_GET(); + struct statvfs90 *s90 = kmem_zalloc(sizeof(*s90), KM_SLEEP); int error; statvfs_to_statvfs90(vs, s90); error = copyout(s90, vs90, l); - STATVFSBUF_PUT(s90); + kmem_free(s90, sizeof(*s90)); return error; } @@ -158,4 +158,4 @@ int __getmntinfo90(struct statvfs **, in __END_DECLS -#endif /* !_SYS_STATVFS_H_ */ +#endif /* !_COMPAT_SYS_STATVFS_H_ */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Sat Jun 27 15:49:30 UTC 2020 Modified Files: src/sys/compat/sys: mount.h Log Message: Ignore the supplied size, and always use the argument size that we know. Found by maxv@ To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/compat/sys/mount.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/mount.h diff -u src/sys/compat/sys/mount.h:1.12 src/sys/compat/sys/mount.h:1.13 --- src/sys/compat/sys/mount.h:1.12 Sat Jun 27 03:00:43 2020 +++ src/sys/compat/sys/mount.h Sat Jun 27 11:49:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.12 2020/06/27 07:00:43 maxv Exp $ */ +/* $NetBSD: mount.h,v 1.13 2020/06/27 15:49:30 christos Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -141,7 +141,7 @@ statvfs_to_statfs12_copy(const void *vs, int error; statvfs_to_statfs12(vs, s12); - error = copyout(s12, vs12, l); + error = copyout(s12, vs12, sizeof(*s12)); STATVFSBUF_PUT(s12); return error;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: maxv Date: Sat Jun 27 07:00:43 UTC 2020 Modified Files: src/sys/compat/sys: mount.h Log Message: Yet another idiotic compat syscall that was developed with literally zero test made. Simply invoking this syscall with _valid parameters_ triggers a fatal fault, because the kernel tries to write to userland addresses. With specially-crafted parameters it is easy to completely escalate privileges into the kernel. Also the size of the allocation is just obviously wrong, but it looks like the callers are even more wrong, so not gonna fix it for now. Reported-by: syzbot+b05096f3114b2820d...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/compat/sys/mount.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/mount.h diff -u src/sys/compat/sys/mount.h:1.11 src/sys/compat/sys/mount.h:1.12 --- src/sys/compat/sys/mount.h:1.11 Fri Oct 4 01:28:02 2019 +++ src/sys/compat/sys/mount.h Sat Jun 27 07:00:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.11 2019/10/04 01:28:02 christos Exp $ */ +/* $NetBSD: mount.h,v 1.12 2020/06/27 07:00:43 maxv Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -140,7 +140,7 @@ statvfs_to_statfs12_copy(const void *vs, struct statfs12 *s12 = STATVFSBUF_GET(); int error; - statvfs_to_statfs12(vs, vs12); + statvfs_to_statfs12(vs, s12); error = copyout(s12, vs12, l); STATVFSBUF_PUT(s12);
CVS commit: src/sys/compat/sys
Module Name:src Committed By: msaitoh Date: Thu Apr 11 04:43:40 UTC 2019 Modified Files: src/sys/compat/sys: sockio.h Log Message: Restore sys/ioccom.h. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.16 src/sys/compat/sys/sockio.h:1.17 --- src/sys/compat/sys/sockio.h:1.16 Thu Apr 11 04:42:08 2019 +++ src/sys/compat/sys/sockio.h Thu Apr 11 04:43:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.16 2019/04/11 04:42:08 msaitoh Exp $ */ +/* $NetBSD: sockio.h,v 1.17 2019/04/11 04:43:40 msaitoh Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -32,6 +32,8 @@ #ifndef _COMPAT_SYS_SOCKIO_H_ #define _COMPAT_SYS_SOCKIO_H_ +#include + #define OIFNAMSIZ 16 struct oifreq {
CVS commit: src/sys/compat/sys
Module Name:src Committed By: msaitoh Date: Thu Apr 11 04:42:08 UTC 2019 Modified Files: src/sys/compat/sys: socket.h sockio.h Log Message: Remove unused macro definitions. OK'd by pgoyette. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/compat/sys/socket.h cvs rdiff -u -r1.15 -r1.16 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/socket.h diff -u src/sys/compat/sys/socket.h:1.17 src/sys/compat/sys/socket.h:1.18 --- src/sys/compat/sys/socket.h:1.17 Sun Jan 27 02:08:41 2019 +++ src/sys/compat/sys/socket.h Thu Apr 11 04:42:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.17 2019/01/27 02:08:41 pgoyette Exp $ */ +/* $NetBSD: socket.h,v 1.18 2019/04/11 04:42:08 msaitoh Exp $ */ /* * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -46,10 +46,6 @@ #define COMPAT_OSOCK #endif -#ifdef COMPAT_70 -#define COMPAT_SOCKCRED70 -#endif - #else #define COMPAT_OSOCK #endif Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.15 src/sys/compat/sys/sockio.h:1.16 --- src/sys/compat/sys/sockio.h:1.15 Wed Apr 10 04:37:00 2019 +++ src/sys/compat/sys/sockio.h Thu Apr 11 04:42:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.15 2019/04/10 04:37:00 msaitoh Exp $ */ +/* $NetBSD: sockio.h,v 1.16 2019/04/11 04:42:08 msaitoh Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -32,30 +32,6 @@ #ifndef _COMPAT_SYS_SOCKIO_H_ #define _COMPAT_SYS_SOCKIO_H_ -#ifdef _KERNEL_OPT - -#include "opt_compat_netbsd.h" -#include "opt_modular.h" - -#include - -#if defined(COMPAT_09) || defined(COMPAT_10) || defined(COMPAT_11) || \ -defined(COMPAT_12) || defined(COMPAT_13) || defined(COMPAT_14) || \ -defined(COMPAT_15) || defined(COMPAT_16) || defined(COMPAT_20) || \ -defined(COMPAT_30) || defined(COMPAT_40) || defined(MODULAR) -#define COMPAT_OIFREQ -#endif - -#if defined(COMPAT_09) || defined(COMPAT_10) || defined(COMPAT_11) || \ -defined(COMPAT_12) || defined(COMPAT_13) || defined(COMPAT_14) || \ -defined(COMPAT_15) || defined(COMPAT_16) || defined(COMPAT_20) || \ -defined(COMPAT_30) || defined(COMPAT_40) || defined(COMPAT_50) || \ -defined(MODULAR) -#define COMPAT_OIFDATA -#endif - -#endif /* _KERNEL_OPT */ - #define OIFNAMSIZ 16 struct oifreq {
CVS commit: src/sys/compat/sys
Module Name:src Committed By: msaitoh Date: Wed Apr 10 04:37:00 UTC 2019 Modified Files: src/sys/compat/sys: sockio.h Log Message: Whitespace change. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.14 src/sys/compat/sys/sockio.h:1.15 --- src/sys/compat/sys/sockio.h:1.14 Wed Apr 10 04:28:03 2019 +++ src/sys/compat/sys/sockio.h Wed Apr 10 04:37:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.14 2019/04/10 04:28:03 msaitoh Exp $ */ +/* $NetBSD: sockio.h,v 1.15 2019/04/10 04:37:00 msaitoh Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -141,43 +141,41 @@ struct oifdatareq { zero ctrs*/ - - #define OBIOCGETIF _IOR('B', 107, struct oifreq) #define OBIOCSETIF _IOW('B', 108, struct oifreq) #define OTAPGIFNAME _IOR('e', 0, struct oifreq) -#define ifreqn2o(oi, ni) \ - do { \ - (void)memcpy((oi)->ifr_name, (ni)->ifr_name, \ - sizeof((oi)->ifr_name)); \ - (void)memcpy(&(oi)->ifr_ifru, &(ni)->ifr_ifru, \ - sizeof((oi)->ifr_ifru)); \ +#define ifreqn2o(oi, ni) \ + do { \ + (void)memcpy((oi)->ifr_name, (ni)->ifr_name, \ + sizeof((oi)->ifr_name)); \ + (void)memcpy(&(oi)->ifr_ifru, &(ni)->ifr_ifru, \ + sizeof((oi)->ifr_ifru)); \ } while (/*CONSTCOND*/0) -#define ifreqo2n(oi, ni) \ - do { \ - (void)memcpy((ni)->ifr_name, (oi)->ifr_name, \ - sizeof((oi)->ifr_name)); \ - (void)memcpy(&(ni)->ifr_ifru, &(oi)->ifr_ifru, \ - sizeof((oi)->ifr_ifru)); \ +#define ifreqo2n(oi, ni) \ + do { \ + (void)memcpy((ni)->ifr_name, (oi)->ifr_name, \ + sizeof((oi)->ifr_name)); \ + (void)memcpy(&(ni)->ifr_ifru, &(oi)->ifr_ifru, \ + sizeof((oi)->ifr_ifru)); \ } while (/*CONSTCOND*/0) -#define ifdatan2o(oi, ni) \ - do { \ - (void)memcpy((oi), (ni), sizeof(*(oi))); \ - (oi)->ifi_lastchange.tv_sec = \ - (int32_t)(ni)->ifi_lastchange.tv_sec; \ - (oi)->ifi_lastchange.tv_usec = \ - (ni)->ifi_lastchange.tv_nsec / 1000; \ +#define ifdatan2o(oi, ni) \ + do { \ + (void)memcpy((oi), (ni), sizeof(*(oi))); \ + (oi)->ifi_lastchange.tv_sec = \ + (int32_t)(ni)->ifi_lastchange.tv_sec; \ + (oi)->ifi_lastchange.tv_usec = \ + (ni)->ifi_lastchange.tv_nsec / 1000; \ } while (/*CONSTCOND*/0) -#define ifdatao2n(oi, ni) \ - do { \ - (void)memcpy((ni), (oi), sizeof(*(oi))); \ +#define ifdatao2n(oi, ni) \ + do { \ + (void)memcpy((ni), (oi), sizeof(*(oi))); \ (ni)->ifi_lastchange.tv_sec = (oi)->ifi_lastchange.tv_sec; \ - (ni)->ifi_lastchange.tv_nsec = \ - (oi)->ifi_lastchange.tv_usec * 1000; \ + (ni)->ifi_lastchange.tv_nsec = \ + (oi)->ifi_lastchange.tv_usec * 1000; \ } while (/*CONSTCOND*/0) #endif /* _COMPAT_SYS_SOCKIO_H_ */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: msaitoh Date: Wed Apr 10 04:28:03 UTC 2019 Modified Files: src/sys/compat/sys: sockio.h Log Message: Fix ifdata"o2n"() macro. This is not a real bug because this macro is not used from anywhere. Both of SIOCGIFDATA and SIOCZIFDATA use "n2o" because ZIFDATA is almost the same as GIFDATA except zeroing after read. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.13 src/sys/compat/sys/sockio.h:1.14 --- src/sys/compat/sys/sockio.h:1.13 Sun Jan 27 02:08:41 2019 +++ src/sys/compat/sys/sockio.h Wed Apr 10 04:28:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.13 2019/01/27 02:08:41 pgoyette Exp $ */ +/* $NetBSD: sockio.h,v 1.14 2019/04/10 04:28:03 msaitoh Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -175,7 +175,6 @@ struct oifdatareq { #define ifdatao2n(oi, ni) \ do { \ (void)memcpy((ni), (oi), sizeof(*(oi))); \ - sizeof((oi)->ifr_name)); \ (ni)->ifi_lastchange.tv_sec = (oi)->ifi_lastchange.tv_sec; \ (ni)->ifi_lastchange.tv_nsec = \ (oi)->ifi_lastchange.tv_usec * 1000; \
CVS commit: src/sys/compat/sys
Module Name:src Committed By: mrg Date: Thu Feb 21 08:25:00 UTC 2019 Modified Files: src/sys/compat/sys: ipc.h Log Message: include libkern.h or strings.h. should fix i386 build issues. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sys/ipc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/ipc.h diff -u src/sys/compat/sys/ipc.h:1.6 src/sys/compat/sys/ipc.h:1.7 --- src/sys/compat/sys/ipc.h:1.6 Thu Feb 21 03:37:19 2019 +++ src/sys/compat/sys/ipc.h Thu Feb 21 08:25:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ipc.h,v 1.6 2019/02/21 03:37:19 mrg Exp $ */ +/* $NetBSD: ipc.h,v 1.7 2019/02/21 08:25:00 mrg Exp $ */ /* * Copyright (c) 1990, 1993 @@ -47,6 +47,12 @@ #ifndef _COMPAT_SYS_IPC_H_ #define _COMPAT_SYS_IPC_H_ +#ifdef _KERNEL +#include +#else +#include +#endif + __BEGIN_DECLS /* * Old IPC permission structure used before NetBSD 1.5.
CVS commit: src/sys/compat/sys
Module Name:src Committed By: pgoyette Date: Mon Jan 28 01:01:59 UTC 2019 Modified Files: src/sys/compat/sys: module.h Log Message: Use the correct macro name for dup-include checking To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/sys/module.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/module.h diff -u src/sys/compat/sys/module.h:1.1 src/sys/compat/sys/module.h:1.2 --- src/sys/compat/sys/module.h:1.1 Sun Jan 27 18:29:10 2019 +++ src/sys/compat/sys/module.h Mon Jan 28 01:01:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: module.h,v 1.1 2019/01/27 18:29:10 christos Exp $ */ +/* $NetBSD: module.h,v 1.2 2019/01/28 01:01:59 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _SYS_COMPAT_MODULE_H_ -#define _SYS_COMPAT_MODULE_H_ +#ifndef _COMPAT_SYS_MODULE_H_ +#define _COMPAT_SYS_MODULE_H_ /* * This structure intentionally has the same layout for 32 and 64 @@ -45,4 +45,4 @@ typedef struct omodstat { u_int oms_reserved[3]; } omodstat_t; -#endif /* !_SYS_COMPAT_MODULE_H_ */ +#endif /* !_COMPAT_SYS_MODULE_H_ */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Sun Jan 27 02:58:48 UTC 2019 Modified Files: src/sys/compat/sys: cpuio.h Log Message: remove extra ifdef. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/compat/sys/cpuio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/cpuio.h diff -u src/sys/compat/sys/cpuio.h:1.9 src/sys/compat/sys/cpuio.h:1.10 --- src/sys/compat/sys/cpuio.h:1.9 Sat Jan 26 21:08:41 2019 +++ src/sys/compat/sys/cpuio.h Sat Jan 26 21:58:47 2019 @@ -1,7 +1,4 @@ -/* $NetBSD: cpuio.h,v 1.9 2019/01/27 02:08:41 pgoyette Exp $ */ - -#ifndef _SYS_COMPAT_CPUIO_H_ -#define _SYS_COMPAT_CPUIO_H_ +/* $NetBSD: cpuio.h,v 1.10 2019/01/27 02:58:47 christos Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc.
CVS commit: src/sys/compat/sys
Module Name:src Committed By: kre Date: Fri Jun 15 08:17:38 UTC 2018 Modified Files: src/sys/compat/sys: time_types.h Log Message: Revert previous, mrg's fix is better (even with possible namespace issues, which I guess are not great in compat includes) the perils of two people doing fixes at around the same time. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/compat/sys/time_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/time_types.h diff -u src/sys/compat/sys/time_types.h:1.4 src/sys/compat/sys/time_types.h:1.5 --- src/sys/compat/sys/time_types.h:1.4 Fri Jun 15 07:46:59 2018 +++ src/sys/compat/sys/time_types.h Fri Jun 15 08:17:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: time_types.h,v 1.4 2018/06/15 07:46:59 kre Exp $ */ +/* $NetBSD: time_types.h,v 1.5 2018/06/15 08:17:38 kre Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -97,7 +97,7 @@ static __inline void timespec_to_timespe struct timespec50 *ts50) { #if INT32_MAX < LONG_MAX /* scrub padding */ - memset(ts50, 0, sizeof(struct timespec50)); + memset(ts50, 0, offsetof(struct timespec50, tv_nsec)); #endif ts50->tv_sec = (int32_t)ts->tv_sec; ts50->tv_nsec = ts->tv_nsec;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: kre Date: Fri Jun 15 07:46:59 UTC 2018 Modified Files: src/sys/compat/sys: time_types.h Log Message: If we are going to use offsetof() we'd need to include to get it defined. Rather than deal with potential namespace issues with that, just clear the entire struct, rather than attempting to stop after the potential padding field. If the compiler is good enough it should make no difference (there are just 3 fields, 2 named ones are assigned to, immediately after the memset() - the compiler can detect that, and not bother assigning (via memset()) to the unmamed 3rd padding field). If the compiler is not smart enough to deal with this, then I doubt writing 8 more zero bytes will make enough difference to matter. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/sys/time_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/time_types.h diff -u src/sys/compat/sys/time_types.h:1.3 src/sys/compat/sys/time_types.h:1.4 --- src/sys/compat/sys/time_types.h:1.3 Fri Jun 15 07:33:27 2018 +++ src/sys/compat/sys/time_types.h Fri Jun 15 07:46:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: time_types.h,v 1.3 2018/06/15 07:33:27 mrg Exp $ */ +/* $NetBSD: time_types.h,v 1.4 2018/06/15 07:46:59 kre Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -97,7 +97,7 @@ static __inline void timespec_to_timespe struct timespec50 *ts50) { #if INT32_MAX < LONG_MAX /* scrub padding */ - memset(ts50, 0, offsetof(struct timespec50, tv_nsec)); + memset(ts50, 0, sizeof(struct timespec50)); #endif ts50->tv_sec = (int32_t)ts->tv_sec; ts50->tv_nsec = ts->tv_nsec;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: mrg Date: Fri Jun 15 07:33:27 UTC 2018 Modified Files: src/sys/compat/sys: time_types.h Log Message: include libkern.h or string.h & stddef.h, to get the offsetof() and memset() definitions. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/compat/sys/time_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/time_types.h diff -u src/sys/compat/sys/time_types.h:1.2 src/sys/compat/sys/time_types.h:1.3 --- src/sys/compat/sys/time_types.h:1.2 Thu Jun 14 10:30:55 2018 +++ src/sys/compat/sys/time_types.h Fri Jun 15 07:33:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: time_types.h,v 1.2 2018/06/14 10:30:55 uwe Exp $ */ +/* $NetBSD: time_types.h,v 1.3 2018/06/15 07:33:27 mrg Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -34,6 +34,13 @@ #ifndef _COMPAT_SYS_TIME_TYPES_H_ #define _COMPAT_SYS_TIME_TYPES_H_ +#ifdef _KERNEL +#include +#else +#include +#include +#endif + /* * Structure returned by gettimeofday(2) system call, * and used in other calls.
CVS commit: src/sys/compat/sys
Module Name:src Committed By: pgoyette Date: Sun Apr 15 22:13:36 UTC 2018 Modified Files: src/sys/compat/sys: sockio.h Log Message: Remove unnecessary __BEGIN_DECLS ... __END_DECLS at Christos's suggestion. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.11 src/sys/compat/sys/sockio.h:1.12 --- src/sys/compat/sys/sockio.h:1.11 Thu Apr 12 18:50:13 2018 +++ src/sys/compat/sys/sockio.h Sun Apr 15 22:13:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.11 2018/04/12 18:50:13 christos Exp $ */ +/* $NetBSD: sockio.h,v 1.12 2018/04/15 22:13:36 pgoyette Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -183,7 +183,6 @@ struct oifdatareq { #ifdef _KERNEL -__BEGIN_DECLS extern int (*vec_compat_ifconf)(struct lwp *, u_long, void *); extern int (*vec_compat_ifdatareq)(struct lwp *, u_long, void *); @@ -191,7 +190,6 @@ void uipc_syscalls_40_init(void); void uipc_syscalls_40_fini(void); void uipc_syscalls_50_init(void); void uipc_syscalls_50_fini(void); -__END_DECLS #endif
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Thu Mar 15 03:22:23 UTC 2018 Modified Files: src/sys/compat/sys: uvm.h Log Message: tidy up To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/sys/uvm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/uvm.h diff -u src/sys/compat/sys/uvm.h:1.1 src/sys/compat/sys/uvm.h:1.2 --- src/sys/compat/sys/uvm.h:1.1 Wed Mar 14 23:13:51 2018 +++ src/sys/compat/sys/uvm.h Wed Mar 14 23:22:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm.h,v 1.1 2018/03/15 03:13:51 christos Exp $ */ +/* $NetBSD: uvm.h,v 1.2 2018/03/15 03:22:23 christos Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -32,17 +32,6 @@ #ifndef _COMPAT_SYS_UVM_H_ #define _COMPAT_SYS_UVM_H_ -void uvm_13_init(void); -void uvm_50_init(void); -void uvm_13_fini(void); -void uvm_50_fini(void); - -struct sys_swapctl_args; - -int (*uvm_swap_stats13)(const struct sys_swapctl_args *, register_t *); -int (*uvm_swap_stats50)(const struct sys_swapctl_args *, register_t *); - -#endif /* _COMPAT_SYS_UVM_H_ */ /* * NetBSD 1.3 swapctl(SWAP_STATS, ...) swapent structure; uses 32 bit * dev_t and has no se_path[] member. @@ -67,3 +56,19 @@ struct swapent50 { int se50_priority; /* priority of this device */ char se50_path[PATH_MAX+1]; /* path name */ }; + +__BEGIN_DECLS + +void uvm_13_init(void); +void uvm_50_init(void); +void uvm_13_fini(void); +void uvm_50_fini(void); + +struct sys_swapctl_args; + +extern int (*uvm_swap_stats13)(const struct sys_swapctl_args *, register_t *); +extern int (*uvm_swap_stats50)(const struct sys_swapctl_args *, register_t *); + +__END_DECLS + +#endif /* _COMPAT_SYS_UVM_H_ */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: maxv Date: Sat Jul 29 06:12:50 UTC 2017 Modified Files: src/sys/compat/sys: socket.h Log Message: Only compat_43 needs compat_osock. Note that the use of vec_compat_ifioctl is racy. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/compat/sys/socket.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/socket.h diff -u src/sys/compat/sys/socket.h:1.14 src/sys/compat/sys/socket.h:1.15 --- src/sys/compat/sys/socket.h:1.14 Thu Apr 7 17:48:40 2016 +++ src/sys/compat/sys/socket.h Sat Jul 29 06:12:50 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.14 2016/04/07 17:48:40 mrg Exp $ */ +/* $NetBSD: socket.h,v 1.15 2017/07/29 06:12:50 maxv Exp $ */ /* * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -43,8 +43,7 @@ #include "opt_compat_43.h" #include "opt_modular.h" -#if defined(COMPAT_43) || defined(COMPAT_LINUX) || defined(COMPAT_SVR4) || \ -defined(COMPAT_ULTRIX) || defined(MODULAR) +#if defined(COMPAT_43) || defined(MODULAR) #define COMPAT_OSOCK #endif
CVS commit: src/sys/compat/sys
Module Name:src Committed By: dholland Date: Sat Aug 27 18:54:24 UTC 2016 Modified Files: src/sys/compat/sys: stat.h Log Message: update comment To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sys/stat.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/stat.h diff -u src/sys/compat/sys/stat.h:1.6 src/sys/compat/sys/stat.h:1.7 --- src/sys/compat/sys/stat.h:1.6 Fri Oct 4 21:07:37 2013 +++ src/sys/compat/sys/stat.h Sat Aug 27 18:54:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.h,v 1.6 2013/10/04 21:07:37 christos Exp $ */ +/* $NetBSD: stat.h,v 1.7 2016/08/27 18:54:24 dholland Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -87,7 +87,7 @@ struct stat12 {/* NetBSD-1.2 stat st * stat structure used to contain timespecs, which had different * alignment constraints than a time_t and a long alone. The padding * should be removed the next time the stat structure ABI is changed. - * (This will happen whever we change to 8 byte time_t.) + * (This happened when we changed to 8 byte time_t.) */ #if defined(_LP64) /* && _BSD_TIME_T_ == int */ #define __STATPAD(x) int x;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: mrg Date: Thu Apr 7 17:48:40 UTC 2016 Modified Files: src/sys/compat/sys: socket.h Log Message: include opt_compat_netbsd.h to get COMPAT_SOCKCRED70 defined. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/compat/sys/socket.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/socket.h diff -u src/sys/compat/sys/socket.h:1.13 src/sys/compat/sys/socket.h:1.14 --- src/sys/compat/sys/socket.h:1.13 Wed Apr 6 19:45:45 2016 +++ src/sys/compat/sys/socket.h Thu Apr 7 17:48:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.13 2016/04/06 19:45:45 roy Exp $ */ +/* $NetBSD: socket.h,v 1.14 2016/04/07 17:48:40 mrg Exp $ */ /* * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -36,6 +36,7 @@ #ifdef _KERNEL_OPT +#include "opt_compat_netbsd.h" #include "opt_compat_linux.h" #include "opt_compat_svr4.h" #include "opt_compat_ultrix.h"
CVS commit: src/sys/compat/sys
Module Name:src Committed By: nat Date: Tue Apr 14 06:11:15 UTC 2015 Modified Files: src/sys/compat/sys: rnd.h Log Message: Include rndio.h for missing defines. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/compat/sys/rnd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/rnd.h diff -u src/sys/compat/sys/rnd.h:1.2 src/sys/compat/sys/rnd.h:1.3 --- src/sys/compat/sys/rnd.h:1.2 Tue Dec 20 16:38:06 2011 +++ src/sys/compat/sys/rnd.h Tue Apr 14 06:11:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.h,v 1.2 2011/12/20 16:38:06 drochner Exp $ */ +/* $NetBSD: rnd.h,v 1.3 2015/04/14 06:11:15 nat Exp $ */ /*- * Copyright (c) 1997,2011 The NetBSD Foundation, Inc. @@ -46,6 +46,7 @@ #endif /* COMPAT_NETBSD32 */ #include sys/rnd.h +#include sys/rndio.h /* * NetBSD-5 used void *state in the rndsource_t struct. rndsource_t
CVS commit: src/sys/compat/sys
Module Name:src Committed By: riastradh Date: Tue Apr 14 12:19:57 UTC 2015 Modified Files: src/sys/compat/sys: rnd.h Log Message: No need for sys/rnd.h here either. Missed this one yesterday too. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/sys/rnd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/rnd.h diff -u src/sys/compat/sys/rnd.h:1.3 src/sys/compat/sys/rnd.h:1.4 --- src/sys/compat/sys/rnd.h:1.3 Tue Apr 14 06:11:15 2015 +++ src/sys/compat/sys/rnd.h Tue Apr 14 12:19:57 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.h,v 1.3 2015/04/14 06:11:15 nat Exp $ */ +/* $NetBSD: rnd.h,v 1.4 2015/04/14 12:19:57 riastradh Exp $ */ /*- * Copyright (c) 1997,2011 The NetBSD Foundation, Inc. @@ -45,7 +45,6 @@ #include compat/netbsd32/netbsd32.h #endif /* COMPAT_NETBSD32 */ -#include sys/rnd.h #include sys/rndio.h /*
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Tue Jan 28 01:29:35 UTC 2014 Modified Files: src/sys/compat/sys: dirent.h Log Message: add a struct for the 4.3BSD struct direct To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/compat/sys/dirent.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/dirent.h diff -u src/sys/compat/sys/dirent.h:1.2 src/sys/compat/sys/dirent.h:1.3 --- src/sys/compat/sys/dirent.h:1.2 Sun Dec 11 07:20:29 2005 +++ src/sys/compat/sys/dirent.h Mon Jan 27 20:29:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dirent.h,v 1.2 2005/12/11 12:20:29 christos Exp $ */ +/* $NetBSD: dirent.h,v 1.3 2014/01/28 01:29:35 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,6 +34,13 @@ #ifndef _COMPAT_SYS_DIRENT_H_ #define _COMPAT_SYS_DIRENT_H_ +struct dirent43 { + u_int32_t d_fileno; /* file number of entry */ + u_int16_t d_reclen; /* length of this record */ + u_int16_t d_namlen; /* length of string in d_name */ + char d_name[255 + 1]; /* name must be no longer than this */ +}; + struct dirent12 { u_int32_t d_fileno; /* file number of entry */ u_int16_t d_reclen; /* length of this record */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: apb Date: Fri Oct 19 17:16:55 UTC 2012 Modified Files: src/sys/compat/sys: ttycom.h Log Message: Fix NetBSD version number in a comment To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/sys/ttycom.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/ttycom.h diff -u src/sys/compat/sys/ttycom.h:1.1 src/sys/compat/sys/ttycom.h:1.2 --- src/sys/compat/sys/ttycom.h:1.1 Fri Oct 19 16:55:22 2012 +++ src/sys/compat/sys/ttycom.h Fri Oct 19 17:16:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ttycom.h,v 1.1 2012/10/19 16:55:22 apb Exp $ */ +/* $NetBSD: ttycom.h,v 1.2 2012/10/19 17:16:55 apb Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ /* * The cn and sn fields in struct ptmget changed size from - * char[16] to char[PATH_MAX] in NetBSD-6.99.12. + * char[16] to char[PATH_MAX] in NetBSD-6.99.14. */ struct compat_60_ptmget { int cfd;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Wed Oct 10 22:51:12 UTC 2012 Added Files: src/sys/compat/sys: syslog.h Log Message: compat hook. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/compat/sys/syslog.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/compat/sys/syslog.h diff -u /dev/null src/sys/compat/sys/syslog.h:1.1 --- /dev/null Wed Oct 10 18:51:12 2012 +++ src/sys/compat/sys/syslog.h Wed Oct 10 18:51:12 2012 @@ -0,0 +1,73 @@ +/* $NetBSD: syslog.h,v 1.1 2012/10/10 22:51:12 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _COMPAT_SYS_SYSLOG_H_ +#define _COMPAT_SYS_SYSLOG_H_ + +struct syslog_data60 { + int log_file; + int connected; + int opened; + int log_stat; + const char *log_tag; + int log_fac; + int log_mask; +}; + +__BEGIN_DECLS +#ifdef __LIBC12_SOURCE__ +void closelog_r(struct syslog_data60 *); +void openlog_r(const char *, int, int, struct syslog_data60 *); +int setlogmask_r(int, struct syslog_data60 *); +void syslog_r(int, struct syslog_data60 *, const char *, ...) +__printflike(3, 4); +void vsyslog_r(int, struct syslog_data60 *, const char *, __va_list) +__printflike(3, 0); +void syslogp_r(int, struct syslog_data60 *, const char *, const char *, +const char *, ...) __printflike(5, 6); +void vsyslogp_r(int, struct syslog_data60 *, const char *, const char *, +const char *, __va_list) __printflike(5, 0); + +struct syslog_data; +void __closelog_r60(struct syslog_data *); +void __openlog_r60(const char *, int, int, struct syslog_data *); +int __setlogmask_r60(int, struct syslog_data *); +void __syslog_r60(int, struct syslog_data *, const char *, ...) +__printflike(3, 4); +void __vsyslog_r60(int, struct syslog_data *, const char *, __va_list) +__printflike(3, 0); +void __syslogp_r60(int, struct syslog_data *, const char *, const char *, +const char *, ...) __printflike(5, 6); +void __vsyslogp_r60(int, struct syslog_data *, const char *, const char *, +const char *, __va_list) __printflike(5, 0); +#endif +__END_DECLS + +#endif /* !_COMPAT_SYS_SYSLOG_H_ */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: njoly Date: Sun Mar 18 21:48:47 UTC 2012 Modified Files: src/sys/compat/sys: ucontext.h Log Message: Add missing semi-colon. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/compat/sys/ucontext.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/ucontext.h diff -u src/sys/compat/sys/ucontext.h:1.4 src/sys/compat/sys/ucontext.h:1.5 --- src/sys/compat/sys/ucontext.h:1.4 Wed Feb 23 02:58:39 2011 +++ src/sys/compat/sys/ucontext.h Sun Mar 18 21:48:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ucontext.h,v 1.4 2011/02/23 02:58:39 joerg Exp $ */ +/* $NetBSD: ucontext.h,v 1.5 2012/03/18 21:48:47 njoly Exp $ */ /*- * Copyright (c) 1999, 2003 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ struct __ucontext32 { }; #ifdef __UCONTEXT32_SIZE -__CTASSERT(sizeof(ucontext32_t) == __UCONTEXT32_SIZE) +__CTASSERT(sizeof(ucontext32_t) == __UCONTEXT32_SIZE); #endif #endif /* COMPAT_NETBSD32 _KERNEL */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: drochner Date: Tue Dec 20 16:38:06 UTC 2011 Modified Files: src/sys/compat/sys: rnd.h Log Message: allow kernels w/o COMPAT_50 to build To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/sys/rnd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/rnd.h diff -u src/sys/compat/sys/rnd.h:1.1 src/sys/compat/sys/rnd.h:1.2 --- src/sys/compat/sys/rnd.h:1.1 Mon Dec 19 21:53:52 2011 +++ src/sys/compat/sys/rnd.h Tue Dec 20 16:38:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.h,v 1.1 2011/12/19 21:53:52 apb Exp $ */ +/* $NetBSD: rnd.h,v 1.2 2011/12/20 16:38:06 drochner Exp $ */ /*- * Copyright (c) 1997,2011 The NetBSD Foundation, Inc. @@ -47,8 +47,6 @@ #include sys/rnd.h -#ifdef COMPAT_50 - /* * NetBSD-5 used void *state in the rndsource_t struct. rndsource_t * was used in rnstat_t and rnstat_name_t, which were used by @@ -149,6 +147,4 @@ int compat_50_rnd_ioctl(struct file *, u #define RNDGETSRCNAME50_32 _IOWR('R', 103, rndstat_name50_32_t) #endif /* COMPAT_NETBSD32 */ -#endif /* COMPAT_50 */ - #endif /* !_COMPAT_SYS_RND_H_ */
CVS commit: src/sys/compat/sys
Module Name:src Committed By: joerg Date: Tue May 24 18:29:23 UTC 2011 Modified Files: src/sys/compat/sys: ipc.h Log Message: Give the body the same static inline treatment as the definition To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/sys/ipc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/ipc.h diff -u src/sys/compat/sys/ipc.h:1.3 src/sys/compat/sys/ipc.h:1.4 --- src/sys/compat/sys/ipc.h:1.3 Mon Jan 19 19:39:41 2009 +++ src/sys/compat/sys/ipc.h Tue May 24 18:29:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ipc.h,v 1.3 2009/01/19 19:39:41 christos Exp $ */ +/* $NetBSD: ipc.h,v 1.4 2011/05/24 18:29:23 joerg Exp $ */ /* * Copyright (c) 1990, 1993 @@ -77,7 +77,7 @@ #undef CVT } -void +static inline void __native_to_ipc_perm14(const struct ipc_perm *perm, struct ipc_perm14 *operm) {
CVS commit: src/sys/compat/sys
Module Name:src Committed By: uebayasi Date: Sun Nov 14 15:36:47 UTC 2010 Modified Files: src/sys/compat/sys: sockio.h Log Message: Include sys/ioccom.h directly because it's used. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.9 src/sys/compat/sys/sockio.h:1.10 --- src/sys/compat/sys/sockio.h:1.9 Sun Nov 7 19:45:06 2010 +++ src/sys/compat/sys/sockio.h Sun Nov 14 15:36:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.9 2010/11/07 19:45:06 pooka Exp $ */ +/* $NetBSD: sockio.h,v 1.10 2010/11/14 15:36:47 uebayasi Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -37,6 +37,8 @@ #include opt_compat_netbsd.h #include opt_modular.h +#include sys/ioccom.h + #if defined(COMPAT_09) || defined(COMPAT_10) || defined(COMPAT_11) || \ defined(COMPAT_12) || defined(COMPAT_13) || defined(COMPAT_14) || \ defined(COMPAT_15) || defined(COMPAT_16) || defined(COMPAT_20) || \
CVS commit: src/sys/compat/sys
Module Name:src Committed By: pooka Date: Sun Nov 7 19:45:06 UTC 2010 Modified Files: src/sys/compat/sys: sockio.h Log Message: If someone wants to define COMPAT_OIFDATA / COMPAT_OIFREQ outside of config, let them. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/compat/sys/sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.8 src/sys/compat/sys/sockio.h:1.9 --- src/sys/compat/sys/sockio.h:1.8 Sat Nov 28 22:11:42 2009 +++ src/sys/compat/sys/sockio.h Sun Nov 7 19:45:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.8 2009/11/28 22:11:42 dsl Exp $ */ +/* $NetBSD: sockio.h,v 1.9 2010/11/07 19:45:06 pooka Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -52,11 +52,6 @@ #define COMPAT_OIFDATA #endif -#else /* !_KERNEL_OPT */ - -#undef COMPAT_OIFREQ -#undef COMPAT_OIFDATA - #endif /* _KERNEL_OPT */ struct oifreq {
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Wed Apr 1 21:15:23 UTC 2009 Modified Files: src/sys/compat/sys: shm.h Log Message: cast segsz to int. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sys/shm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/shm.h diff -u src/sys/compat/sys/shm.h:1.6 src/sys/compat/sys/shm.h:1.7 --- src/sys/compat/sys/shm.h:1.6 Mon Jan 19 14:39:41 2009 +++ src/sys/compat/sys/shm.h Wed Apr 1 17:15:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: shm.h,v 1.6 2009/01/19 19:39:41 christos Exp $ */ +/* $NetBSD: shm.h,v 1.7 2009/04/01 21:15:23 christos Exp $ */ /* * Copyright (c) 1994 Adam Glass @@ -115,7 +115,7 @@ #define CVT(x) oshmbuf-x = shmbuf-x #define CVTI(x) oshmbuf-x = (int)shmbuf-x - CVT(shm_segsz); + CVTI(shm_segsz); CVT(shm_lpid); CVT(shm_cpid); CVT(shm_nattch);