Module Name:    src
Committed By:   mrg
Date:           Mon Mar  2 09:50:12 UTC 2020

Modified Files:
        src/usr.bin/systat: bufcache.c vmstat.c

Log Message:
increase slot slop space from 100 to 1000 before giving up.

from Paul Ripke on current-users.  thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/systat/bufcache.c
cvs rdiff -u -r1.87 -r1.88 src/usr.bin/systat/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/systat/bufcache.c
diff -u src/usr.bin/systat/bufcache.c:1.29 src/usr.bin/systat/bufcache.c:1.30
--- src/usr.bin/systat/bufcache.c:1.29	Wed Dec 26 01:47:37 2018
+++ src/usr.bin/systat/bufcache.c	Mon Mar  2 09:50:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bufcache.c,v 1.29 2018/12/26 01:47:37 sevan Exp $	*/
+/*	$NetBSD: bufcache.c,v 1.30 2020/03/02 09:50:12 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: bufcache.c,v 1.29 2018/12/26 01:47:37 sevan Exp $");
+__RCSID("$NetBSD: bufcache.c,v 1.30 2020/03/02 09:50:12 mrg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -290,8 +290,8 @@ again:
 	}
 	if (sysctl(mib, 6, buffers, &size, NULL, 0) < 0) {
 		free(buffers);
-		if (extraslop == 0) {
-			extraslop = 100;
+		if (extraslop < 1000) {
+			extraslop += 100;
 			goto again;
 		}
 		error("can't get buffers: %s\n", strerror(errno));

Index: src/usr.bin/systat/vmstat.c
diff -u src/usr.bin/systat/vmstat.c:1.87 src/usr.bin/systat/vmstat.c:1.88
--- src/usr.bin/systat/vmstat.c:1.87	Sun Jun 30 19:57:23 2019
+++ src/usr.bin/systat/vmstat.c	Mon Mar  2 09:50:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmstat.c,v 1.87 2019/06/30 19:57:23 he Exp $	*/
+/*	$NetBSD: vmstat.c,v 1.88 2020/03/02 09:50:12 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1989, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)vmstat.c	8.2 (Berkeley) 1/12/94";
 #endif
-__RCSID("$NetBSD: vmstat.c,v 1.87 2019/06/30 19:57:23 he Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.88 2020/03/02 09:50:12 mrg Exp $");
 #endif /* not lint */
 
 /*
@@ -552,8 +552,8 @@ again:
 	}
 	if (sysctl(mib, 6, buffers, &size, NULL, 0) < 0) {
 		free(buffers);
-		if (extraslop == 0) {
-			extraslop = 100;
+		if (extraslop < 1000) {
+			extraslop += 100;
 			goto again;
 		}
 		error("can't get buffers: %s\n", strerror(errno));

Reply via email to