Skip to content

Commit

Permalink
netstat: Fix duplicate keys in libxo output
Browse files Browse the repository at this point in the history
Duplicate keys in libxo output have been given a unique name.

PR: 244589, 254672
Pull Request: #1331
  • Loading branch information
bramton committed Jul 19, 2024
1 parent f205561 commit e1f26be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions usr.bin/netstat/if.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ intpr(void (*pfunc)(char *), int af)
IFA_STAT(ipackets), link|network, 1);
show_stat("lu", nerr_len, "received-errors", IFA_STAT(ierrors),
link, 1);
show_stat("lu", nerr_len, "dropped-packets", IFA_STAT(iqdrops),
show_stat("lu", nerr_len, "dropped-packets-in", IFA_STAT(iqdrops),

Check warning on line 504 in usr.bin/netstat/if.c

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters

Check warning on line 504 in usr.bin/netstat/if.c

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
link, 1);
if (bflag)
show_stat("lu", nbyte_len, "received-bytes",
Expand All @@ -516,7 +516,7 @@ intpr(void (*pfunc)(char *), int af)
show_stat("NRSlu", nerr_len, "collisions", IFA_STAT(collisions),
link, 1);
if (dflag)
show_stat("LSlu", nerr_len, "dropped-packets",
show_stat("LSlu", nerr_len, "dropped-packets-out",
IFA_STAT(oqdrops), link, 1);
xo_emit("\n");

Expand Down Expand Up @@ -705,7 +705,7 @@ sidewaysintpr(void)
new->ift_ip - old->ift_ip, 1, 1);
show_stat("lu", 5, "received-errors",
new->ift_ie - old->ift_ie, 1, 1);
show_stat("lu", 5, "dropped-packets",
show_stat("lu", 5, "dropped-packets-in",
new->ift_id - old->ift_id, 1, 1);
show_stat("lu", 10, "received-bytes",
new->ift_ib - old->ift_ib, 1, 0);
Expand All @@ -718,7 +718,7 @@ sidewaysintpr(void)
show_stat("NRSlu", 5, "collisions",
new->ift_co - old->ift_co, 1, 1);
if (dflag)
show_stat("LSlu", 5, "dropped-packets",
show_stat("LSlu", 5, "dropped-packets-out",
new->ift_od - old->ift_od, 1, 1);
xo_close_instance("stats");
xo_emit("\n");
Expand Down
2 changes: 1 addition & 1 deletion usr.bin/netstat/sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ sctp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
"secret\n");
p(sctps_timopathmtu, "\t\t{:pmtu-timer/%ju} "
"{N:/PMTU timer%s fired}\n");
p(sctps_timoshutdownack, "\t\t{:shutdown-timer/%ju} "
p(sctps_timoshutdownack, "\t\t{:shutdown-ack-timer/%ju} "
"{N:/shutdown ack timer%s fired}\n");
p(sctps_timoshutdownguard, "\t\t{:shutdown-guard-timer/%ju} "
"{N:/shutdown guard timer%s fired}\n");

Check warning on line 717 in usr.bin/netstat/sctp.c

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line

Check warning on line 717 in usr.bin/netstat/sctp.c

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line
Expand Down

0 comments on commit e1f26be

Please sign in to comment.