Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/usr.sbin/iostat Pull up following revision(s) (requested ...
details: https://anonhg.NetBSD.org/src/rev/9318ba0d37a3
branches: netbsd-9
changeset: 374115:9318ba0d37a3
user: martin <martin%NetBSD.org@localhost>
date: Sat Apr 01 16:25:10 2023 +0000
description:
Pull up following revision(s) (requested by kre in ticket #1626):
usr.sbin/iostat/iostat.c: revision 1.68
Fix processing of the archaic arg format (BACKWARD_COMPATIBILITY) so it
doesn't repeat the processing every iteration. Repeatedly seeing the wait
interval does no harm, but setting the iteration count (reps) over and
over again rather defeats its purpose.
diffstat:
usr.sbin/iostat/iostat.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (63 lines):
diff -r 15822f53ff02 -r 9318ba0d37a3 usr.sbin/iostat/iostat.c
--- a/usr.sbin/iostat/iostat.c Sat Apr 01 16:22:14 2023 +0000
+++ b/usr.sbin/iostat/iostat.c Sat Apr 01 16:25:10 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iostat.c,v 1.67 2018/04/08 11:37:31 mlelstv Exp $ */
+/* $NetBSD: iostat.c,v 1.67.4.1 2023/04/01 16:25:10 martin Exp $ */
/*
* Copyright (c) 1996 John M. Vinopal
@@ -71,7 +71,7 @@
#if 0
static char sccsid[] = "@(#)iostat.c 8.3 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: iostat.c,v 1.67 2018/04/08 11:37:31 mlelstv Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.67.4.1 2023/04/01 16:25:10 martin Exp $");
#endif
#endif /* not lint */
@@ -124,7 +124,7 @@ static volatile int do_header;
static void header(void);
__dead static void usage(void);
static void display(void);
-static int selectdrives(int, char *[]);
+static int selectdrives(int, char *[], int);
int
main(int argc, char *argv[])
@@ -203,7 +203,7 @@ main(int argc, char *argv[])
drvinit(0);
cpureadstats();
drvreadstats();
- ndrives = selectdrives(argc, argv);
+ ndrives = selectdrives(argc, argv, 1);
if (ndrives == 0) {
/* No drives are selected. No need to show drive stats. */
todo &= ~SHOW_STATS_ALL;
@@ -245,7 +245,7 @@ main(int argc, char *argv[])
cpureadstats();
drvreadstats();
- ndrives = selectdrives(argc, argv);
+ ndrives = selectdrives(argc, argv, 0);
}
exit(0);
}
@@ -614,7 +614,7 @@ out:
}
static int
-selectdrives(int argc, char *argv[])
+selectdrives(int argc, char *argv[], int first)
{
int i, maxdrives, ndrives, tried;
@@ -663,7 +663,7 @@ selectdrives(int argc, char *argv[])
}
#ifdef BACKWARD_COMPATIBILITY
- if (*argv) {
+ if (first && *argv) {
interval = atoi(*argv);
if (*++argv)
reps = atoi(*argv);
Home |
Main Index |
Thread Index |
Old Index