summaryrefslogtreecommitdiff
path: root/usr.sbin/iostat
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2009-11-22 22:22:15 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2009-11-22 22:22:15 +0000
commitbb90f7b7168465d1e42d257ee78029fc88e01916 (patch)
tree0d73984848bf7997e4630c7beaa1c755bbef5e70 /usr.sbin/iostat
parent608334aa4d8017a9ffff28e15fb58ce1d8db678e (diff)
don't repeat the banner if not a tty.
add a -c count option to netstat. tweak spacing to not smear fields in vmstat. ok deraadt sthen
Diffstat (limited to 'usr.sbin/iostat')
-rw-r--r--usr.sbin/iostat/iostat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index 8280b5b52a4..7da45b59b4e 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iostat.c,v 1.26 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: iostat.c,v 1.27 2009/11/22 22:22:14 tedu Exp $ */
/* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */
/*
@@ -198,6 +198,10 @@ static void
header(void)
{
int i;
+ static int printedheader = 0;
+
+ if (printedheader && !isatty(STDOUT_FILENO))
+ return;
/* Main Headers. */
if (ISSET(todo, SHOW_TTY))