Module Name: src Committed By: martin Date: Mon Dec 11 12:29:30 UTC 2023
Modified Files: src/usr.bin/systat [netbsd-8]: vmstat.c Log Message: Pull up following revision(s) (requested by kre in ticket #1926): usr.bin/systat/vmstat.c: revision 1.92 PR bin/56014 from Kouichi Hashikawa Don't try to optimise away placing the "s" or " " after "N user" (" " where N==1, "s" otherwise) when it seems unnecessary, as that fails when the number of users hasn't changed, but the screen is being redrawn from nothing (as in after being resumed from a ^Z, as in the PR, but just doing a ^L would make the same thing happen). To generate a diff of this commit: cvs rdiff -u -r1.81.8.2 -r1.81.8.3 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/vmstat.c diff -u src/usr.bin/systat/vmstat.c:1.81.8.2 src/usr.bin/systat/vmstat.c:1.81.8.3 --- src/usr.bin/systat/vmstat.c:1.81.8.2 Wed Jan 30 13:46:25 2019 +++ src/usr.bin/systat/vmstat.c Mon Dec 11 12:29:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.81.8.2 2019/01/30 13:46:25 martin Exp $ */ +/* $NetBSD: vmstat.c,v 1.81.8.3 2023/12/11 12:29:30 martin 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.81.8.2 2019/01/30 13:46:25 martin Exp $"); +__RCSID("$NetBSD: vmstat.c,v 1.81.8.3 2023/12/11 12:29:30 martin Exp $"); #endif /* not lint */ /* @@ -654,19 +654,16 @@ vmstat_zero(char *args) static int ucount(void) { - static int onusers = -1; int nusers = 0; struct utmpentry *ehead; nusers = getutentries(NULL, &ehead); - if (nusers != onusers) { - if (nusers == 1) - mvprintw(STATROW, STATCOL + 8, " "); - else - mvprintw(STATROW, STATCOL + 8, "s"); - } - onusers = nusers; + if (nusers == 1) + mvprintw(STATROW, STATCOL + 8, " "); + else + mvprintw(STATROW, STATCOL + 8, "s"); + return (nusers); }