Subject: re: CVS commit: src/usr.sbin/iostat
To: None <mrg@eterna.com.au>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: source-changes
Date: 01/08/2006 17:54:35
> perhaps another switch for what you like would be best?
> (most?) other systems "iostat -x" seem to always print a header.
i guess you want to handle -x as it produces multi lines for each output.
right? if so, how about making it conditional on that?
YAMAMOTO Takashi
Index: iostat.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/iostat/iostat.c,v
retrieving revision 1.46
diff -u -p -r1.46 iostat.c
--- iostat.c 8 Jan 2006 08:47:16 -0000 1.46
+++ iostat.c 8 Jan 2006 08:52:55 -0000
@@ -217,9 +217,7 @@ main(int argc, char *argv[])
(void)signal(SIGCONT, sig_header);
for (hdrcnt = 1;;) {
- if (do_header ||
- ((hdrcnt -= lines) <= 0) ||
- ISSET(todo, SHOW_STATS_X)) {
+ if (do_header || lines > 1 || (hdrcnt -= lines) <= 0) {
do_header = 0;
header();
hdrcnt = winlines - 4;