Module Name: src
Committed By: snj
Date: Mon Nov 6 09:55:57 UTC 2017
Modified Files:
src/sys/kern [netbsd-8]: kern_history.c
src/sys/sys [netbsd-8]: kernhist.h
src/usr.bin/vmstat [netbsd-8]: vmstat.c
Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #343):
sys/kern/kern_history.c: revision 1.16
sys/sys/kernhist.h: revision 1.22
usr.bin/vmstat/vmstat.c: revision 1.220
Remove the ABI version-and-length check that was recently introduced;
sysctl(9) ABIs should be stable across versions.
To generate a diff of this commit:
cvs rdiff -u -r1.14.8.1 -r1.14.8.2 src/sys/kern/kern_history.c
cvs rdiff -u -r1.18.8.2 -r1.18.8.3 src/sys/sys/kernhist.h
cvs rdiff -u -r1.216.6.2 -r1.216.6.3 src/usr.bin/vmstat/vmstat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_history.c
diff -u src/sys/kern/kern_history.c:1.14.8.1 src/sys/kern/kern_history.c:1.14.8.2
--- src/sys/kern/kern_history.c:1.14.8.1 Thu Nov 2 21:29:52 2017
+++ src/sys/kern/kern_history.c Mon Nov 6 09:55:57 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_history.c,v 1.14.8.1 2017/11/02 21:29:52 snj Exp $ */
+/* $NetBSD: kern_history.c,v 1.14.8.2 2017/11/06 09:55:57 snj Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.14.8.1 2017/11/02 21:29:52 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_history.c,v 1.14.8.2 2017/11/06 09:55:57 snj Exp $");
#include "opt_ddb.h"
#include "opt_kernhist.h"
@@ -460,12 +460,6 @@ sysctl_kernhist_helper(SYSCTLFN_ARGS)
buf = kmem_alloc(bufsize, KM_SLEEP);
/*
- * Set the export structure's version info
- */
- buf->sh_version = KERNHIST_SYSCTL_VERSION;
- buf->sh_arglen = sizeof(uintmax_t);
-
- /*
* Copy history header info to the export structure
*/
j = find_string(xlate_t, &xlate_c, h->name, h->namelen);
Index: src/sys/sys/kernhist.h
diff -u src/sys/sys/kernhist.h:1.18.8.2 src/sys/sys/kernhist.h:1.18.8.3
--- src/sys/sys/kernhist.h:1.18.8.2 Thu Nov 2 21:29:52 2017
+++ src/sys/sys/kernhist.h Mon Nov 6 09:55:57 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: kernhist.h,v 1.18.8.2 2017/11/02 21:29:52 snj Exp $ */
+/* $NetBSD: kernhist.h,v 1.18.8.3 2017/11/06 09:55:57 snj Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -89,8 +89,7 @@ struct sysctl_history_event {
/* list of all events for a single history */
struct sysctl_history {
- uint16_t sh_version;
- uint16_t sh_arglen;
+ uint32_t filler;
uint32_t sh_nameoffset;
uint32_t sh_numentries;
uint32_t sh_nextfree;
Index: src/usr.bin/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.216.6.2 src/usr.bin/vmstat/vmstat.c:1.216.6.3
--- src/usr.bin/vmstat/vmstat.c:1.216.6.2 Thu Nov 2 21:29:53 2017
+++ src/usr.bin/vmstat/vmstat.c Mon Nov 6 09:55:56 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.216.6.2 2017/11/02 21:29:53 snj Exp $ */
+/* $NetBSD: vmstat.c,v 1.216.6.3 2017/11/06 09:55:56 snj Exp $ */
/*-
* Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
#else
-__RCSID("$NetBSD: vmstat.c,v 1.216.6.2 2017/11/02 21:29:53 snj Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.216.6.3 2017/11/06 09:55:56 snj Exp $");
#endif
#endif /* not lint */
@@ -2273,11 +2273,6 @@ hist_dodump_sysctl(int mib[], unsigned i
if (errno != 0)
err(1, "sysctl failed");
- /* Make sure we've got matching versions */
- if (hist->sh_version != KERNHIST_SYSCTL_VERSION ||
- hist->sh_arglen != sizeof(uintmax_t))
- errx(1, "Kernel version or argument length mismatch!");
-
strp = (char *)(&hist->sh_events[hist->sh_numentries]);
(void)printf("%"PRIu32" entries, next is %"PRIu32"\n",