diff options
author | Krishnendu Sadhukhan - Sun Microsystems <Krishnendu.Sadhukhan@Sun.COM> | 2009-08-05 20:39:41 -0700 |
---|---|---|
committer | Krishnendu Sadhukhan - Sun Microsystems <Krishnendu.Sadhukhan@Sun.COM> | 2009-08-05 20:39:41 -0700 |
commit | 26fd77009b17f8c8fb32eb362584cfd635e87ad9 (patch) | |
tree | 6d69403d719d85f7ed8586b733a77f04743e25f4 /usr/src/cmd/stat/iostat/iostat.c | |
parent | 7ff836697c120cb94bd30d5c2204eb9b74718e4c (diff) | |
download | illumos-joyent-26fd77009b17f8c8fb32eb362584cfd635e87ad9.tar.gz |
6824918 timestamp option for xxstat commands
PSARC/2009/307 Time Stamp Option for xxstat Commands Phase II
Contributed by Chad Mynhier <cmynhier@gmail.com>
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) */ |