Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/iostat Don't unnecessarily check device names if "-...



details:   https://anonhg.NetBSD.org/src/rev/f05e4647a06b
branches:  trunk
changeset: 476316:f05e4647a06b
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Sep 13 16:59:54 1999 +0000

description:
Don't unnecessarily check device names if "-x" is used.

diffstat:

 usr.sbin/iostat/iostat.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (38 lines):

diff -r a039cdee1243 -r f05e4647a06b usr.sbin/iostat/iostat.c
--- a/usr.sbin/iostat/iostat.c  Mon Sep 13 16:56:35 1999 +0000
+++ b/usr.sbin/iostat/iostat.c  Mon Sep 13 16:59:54 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iostat.c,v 1.19 1999/09/13 16:56:35 tron Exp $ */
+/*     $NetBSD: iostat.c,v 1.20 1999/09/13 16:59:54 tron Exp $ */
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -75,7 +75,7 @@
 #if 0
 static char sccsid[] = "@(#)iostat.c   8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: iostat.c,v 1.19 1999/09/13 16:56:35 tron Exp $");
+__RCSID("$NetBSD: iostat.c,v 1.20 1999/09/13 16:59:54 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -465,12 +465,13 @@
                if (isdigit(**argv))
                        break;
 #endif
-               for (i = 0; i < dk_ndrive; i++) {
-                       if (strcmp(cur.dk_name[i], *argv))
-                               continue;
-                       cur.dk_select[i] = 1;
-                       ++ndrives;
-               }
+               if (!ISSET(todo, SHOW_STATS_X))
+                       for (i = 0; i < dk_ndrive; i++) {
+                               if (strcmp(cur.dk_name[i], *argv))
+                                       continue;
+                               cur.dk_select[i] = 1;
+                               ++ndrives;
+                       }
        }
 #ifdef BACKWARD_COMPATIBILITY
        if (*argv) {



Home | Main Index | Thread Index | Old Index