Module Name: src Committed By: joerg Date: Mon Jun 2 19:16:11 UTC 2014
Modified Files: src/usr.bin/vmstat: vmstat.c Log Message: Make missing kern.evcnt an error, don't try to fallback to kmem use. To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 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/usr.bin/vmstat/vmstat.c diff -u src/usr.bin/vmstat/vmstat.c:1.192 src/usr.bin/vmstat/vmstat.c:1.193 --- src/usr.bin/vmstat/vmstat.c:1.192 Thu May 8 08:21:53 2014 +++ src/usr.bin/vmstat/vmstat.c Mon Jun 2 19:16:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.192 2014/05/08 08:21:53 hannken Exp $ */ +/* $NetBSD: vmstat.c,v 1.193 2014/06/02 19:16:10 joerg 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.192 2014/05/08 08:21:53 hannken Exp $"); +__RCSID("$NetBSD: vmstat.c,v 1.193 2014/06/02 19:16:10 joerg Exp $"); #endif #endif /* not lint */ @@ -1144,10 +1144,7 @@ doevcnt(int verbose, int type) error = sysctl(mib, __arraycount(mib), buf, &newlen, NULL, 0); if (error) { - /* if the sysctl is unknown, try groveling */ - if (error == ENOENT) - break; - warn("kern.evcnt"); + err(1, "kern.evcnt"); if (buf) free(buf); return;