diff options
| author | Peter Tribble <peter.tribble@gmail.com> | 2020-02-27 10:05:51 +0000 |
|---|---|---|
| committer | Peter Tribble <peter.tribble@gmail.com> | 2020-03-04 07:34:59 +0000 |
| commit | 3d349c3119b5b6e21daba1ce004cf4625b25d67f (patch) | |
| tree | 1e2477b9303b449f3996efffdfc9b70e33a2d40c /usr/src/cmd/dlstat | |
| parent | 9dc2843d4266243e87f5d9de7a90b86235a6da08 (diff) | |
| download | illumos-joyent-3d349c3119b5b6e21daba1ce004cf4625b25d67f.tar.gz | |
12342 bandwidth display badly formatted in flowstat, dlstat, and dladm
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/cmd/dlstat')
| -rw-r--r-- | usr/src/cmd/dlstat/dlstat.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/usr/src/cmd/dlstat/dlstat.c b/usr/src/cmd/dlstat/dlstat.c index 63e844a895..915c2196d1 100644 --- a/usr/src/cmd/dlstat/dlstat.c +++ b/usr/src/cmd/dlstat/dlstat.c @@ -27,6 +27,10 @@ * Copyright 2017 Joyent, Inc. */ +/* + * Copyright 2020 Peter Tribble. + */ + #include <stdio.h> #include <ctype.h> #include <locale.h> @@ -414,7 +418,7 @@ typedef struct history_fields_buf_s { char h_rbytes[10]; char h_opackets[9]; char h_obytes[10]; - char h_bandwidth[14]; + char h_bandwidth[15]; } history_fields_buf_t; static ofmt_field_t history_fields[] = { @@ -430,7 +434,7 @@ static ofmt_field_t history_fields[] = { offsetof(history_fields_buf_t, h_opackets), print_default_cb}, { "OBYTES", 11, offsetof(history_fields_buf_t, h_obytes), print_default_cb}, -{ "BANDWIDTH", 15, +{ "BANDWIDTH", 16, offsetof(history_fields_buf_t, h_bandwidth), print_default_cb}, { NULL, 0, 0, NULL}}; @@ -443,7 +447,7 @@ typedef struct history_l_fields_buf_s { char hl_etime[13]; char hl_rbytes[8]; char hl_obytes[8]; - char hl_bandwidth[14]; + char hl_bandwidth[15]; } history_l_fields_buf_t; static ofmt_field_t history_l_fields[] = { @@ -458,7 +462,7 @@ static ofmt_field_t history_l_fields[] = { offsetof(history_l_fields_buf_t, hl_rbytes), print_default_cb}, { "OBYTES", 9, offsetof(history_l_fields_buf_t, hl_obytes), print_default_cb}, -{ "BANDWIDTH", 15, +{ "BANDWIDTH", 16, offsetof(history_l_fields_buf_t, hl_bandwidth), print_default_cb}, { NULL, 0, 0, NULL}} ; @@ -566,7 +570,7 @@ show_history_time(dladm_usage_t *history, void *arg) { show_history_state_t *state = arg; char buf[DLADM_STRSIZE]; - history_l_fields_buf_t ubuf; + history_l_fields_buf_t ubuf; time_t time; double bw; dladm_status_t status; @@ -751,7 +755,7 @@ do_show_history(int argc, char *argv[], const char *use) die("show-link -h requires a file"); if (optind == (argc-1)) { - uint32_t flags; + uint32_t flags; resource = argv[optind]; if (!state.hs_showall && @@ -1494,7 +1498,7 @@ static int show_queried_stats(dladm_handle_t dh, datalink_id_t linkid, void *arg) { show_state_t *state = arg; - int i; + int i; dladm_stat_chain_t *diff_stat; char linkname[DLPI_LINKNAME_MAX]; @@ -1639,7 +1643,7 @@ do_show(int argc, char *argv[], const char *use) ofmt_handle_t ofmt; ofmt_status_t oferr; uint_t ofmtflags = OFMT_RIGHTJUST; - ofmt_field_t *oftemplate; + ofmt_field_t *oftemplate; bzero(&state, sizeof (state)); opterr = 0; @@ -1840,7 +1844,7 @@ do_show_phys(int argc, char *argv[], const char *use) ofmt_handle_t ofmt; ofmt_status_t oferr; uint_t ofmtflags = OFMT_RIGHTJUST; - ofmt_field_t *oftemplate; + ofmt_field_t *oftemplate; bzero(&state, sizeof (state)); opterr = 0; @@ -2022,7 +2026,7 @@ do_show_link(int argc, char *argv[], const char *use) ofmt_handle_t ofmt; ofmt_status_t oferr; uint_t ofmtflags = OFMT_RIGHTJUST; - ofmt_field_t *oftemplate; + ofmt_field_t *oftemplate; bzero(&state, sizeof (state)); opterr = 0; @@ -2227,7 +2231,7 @@ do_show_aggr(int argc, char *argv[], const char *use) ofmt_handle_t ofmt; ofmt_status_t oferr; uint_t ofmtflags = OFMT_RIGHTJUST; - ofmt_field_t *oftemplate; + ofmt_field_t *oftemplate; bzero(&state, sizeof (state)); opterr = 0; |
