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/flowstat/flowstat.c | |
| 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/flowstat/flowstat.c')
| -rw-r--r-- | usr/src/cmd/flowstat/flowstat.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/usr/src/cmd/flowstat/flowstat.c b/usr/src/cmd/flowstat/flowstat.c index edfc844a94..23e973c8a2 100644 --- a/usr/src/cmd/flowstat/flowstat.c +++ b/usr/src/cmd/flowstat/flowstat.c @@ -31,6 +31,10 @@ * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. */ +/* + * Copyright 2020 Peter Tribble. + */ + #include <stdio.h> #include <locale.h> #include <stdarg.h> @@ -139,7 +143,7 @@ typedef struct history_fields_buf_s { char history_rbytes[10]; char history_opackets[9]; char history_obytes[10]; - char history_bandwidth[14]; + char history_bandwidth[15]; } history_fields_buf_t; static ofmt_field_t history_fields[] = { @@ -156,7 +160,7 @@ static ofmt_field_t history_fields[] = { offsetof(history_fields_buf_t, history_opackets), print_default_cb}, { "OBYTES", 11, offsetof(history_fields_buf_t, history_obytes), print_default_cb}, -{ "BANDWIDTH", 15, +{ "BANDWIDTH", 16, offsetof(history_fields_buf_t, history_bandwidth), print_default_cb}, NULL_OFMT} ; @@ -167,7 +171,7 @@ typedef struct history_l_fields_buf_s { char history_l_etime[13]; char history_l_rbytes[8]; char history_l_obytes[8]; - char history_l_bandwidth[14]; + char history_l_bandwidth[15]; } history_l_fields_buf_t; static ofmt_field_t history_l_fields[] = { @@ -182,7 +186,7 @@ static ofmt_field_t history_l_fields[] = { offsetof(history_l_fields_buf_t, history_l_rbytes), print_default_cb}, { "OBYTES", 9, offsetof(history_l_fields_buf_t, history_l_obytes), print_default_cb}, -{ "BANDWIDTH", 15, +{ "BANDWIDTH", 16, offsetof(history_l_fields_buf_t, history_l_bandwidth), print_default_cb}, NULL_OFMT} @@ -544,7 +548,7 @@ dump_all_flow_stats(dladm_flow_attr_t *attrp, void *arg, datalink_id_t linkid, int main(int argc, char *argv[]) { - dladm_status_t status; + dladm_status_t status; int option; boolean_t r_arg = B_FALSE; boolean_t t_arg = B_FALSE; @@ -782,7 +786,7 @@ show_history_time(dladm_usage_t *history, void *arg) { show_history_state_t *state = (show_history_state_t *)arg; char buf[DLADM_STRSIZE]; - history_l_fields_buf_t ubuf; + history_l_fields_buf_t ubuf; time_t time; double bw; dladm_flow_attr_t attr; |
