diff options
Diffstat (limited to 'usr/src/cmd/stat/iostat/iostat.c')
-rw-r--r-- | usr/src/cmd/stat/iostat/iostat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/cmd/stat/iostat/iostat.c b/usr/src/cmd/stat/iostat/iostat.c index 958c1b19d1..2720e51f34 100644 --- a/usr/src/cmd/stat/iostat/iostat.c +++ b/usr/src/cmd/stat/iostat/iostat.c @@ -126,7 +126,7 @@ static uint_t do_conversions; /* display disks as cXtYdZ (-n) */ static uint_t do_megabytes; /* display data in MB/sec (-M) */ static uint_t do_controller; /* display controller info (-C) */ static uint_t do_raw; /* emit raw format (-r) */ -extern uint_t timestamp_fmt; /* timestamp each display (-T) */ +static uint_t timestamp_fmt = NODATE; /* timestamp each display (-T) */ static uint_t do_devid; /* -E should show devid */ /* @@ -293,6 +293,10 @@ main(int argc, char **argv) if (formatter_list) { format_t *tmp; tmp = formatter_list; + + if (timestamp_fmt != NODATE) + print_timestamp(timestamp_fmt); + while (tmp) { (tmp->nfunc)(); tmp = tmp->next; @@ -1356,9 +1360,6 @@ do_format(void) dh_len = strlen(disk_header) - 2; } - if (timestamp_fmt != NODATE) - setup(print_timestamp); - /* * -n *and* (-E *or* -e *or* -x) */ |