diff options
author | Warner Losh <imp@FreeBSD.org> | 2024-09-22 13:21:07 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2024-09-22 13:23:10 +0000 |
commit | d00827a9ca0b4f1838b8671859c52c852c6a2727 (patch) | |
tree | 91ec40c2e98fe5f67c80ed50414ebb2bd6e8c2c6 | |
parent | 1f0174c92786938ee260d973f5c5172b1a4f6435 (diff) | |
download | src-d00827a9ca0b.tar.gz src-d00827a9ca0b.zip |
Revert "netstat: Resolve duplicate "dropped-packets" key from libxo output"
This reverts commit 94567c8641e235763b5b2926416d89d36654cde1.
This breaks normal netstat output. It's kinda tricky to do a quick fix
on, so revert this until that can be fixed. If via github, please
open a new pull request...
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
-rw-r--r-- | usr.bin/netstat/if.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 877c7aa8dd5e..172ea5324ccb 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -501,11 +501,8 @@ intpr(void (*pfunc)(char *), int af) IFA_STAT(ipackets), link|network, 1); show_stat("lu", nerr_len, "received-errors", IFA_STAT(ierrors), link, 1); - /* Below is kept for backwards compatibility. Will be removed before FreeBSD 16. */ show_stat("lu", nerr_len, "dropped-packets", IFA_STAT(iqdrops), link, 1); - show_stat("lu", nerr_len, "dropped-packets-in", IFA_STAT(iqdrops), - link, 1); if (bflag) show_stat("lu", nbyte_len, "received-bytes", IFA_STAT(ibytes), link|network, 0); @@ -519,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-out", + show_stat("LSlu", nerr_len, "dropped-packets", IFA_STAT(oqdrops), link, 1); xo_emit("\n"); @@ -708,11 +705,8 @@ loop: new->ift_ip - old->ift_ip, 1, 1); show_stat("lu", 5, "received-errors", new->ift_ie - old->ift_ie, 1, 1); - /* Below is kept for backwards compatibility. Will be removed before FreeBSD 16. */ show_stat("lu", 5, "dropped-packets", new->ift_id - old->ift_id, 1, 1); - 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); show_stat("lu", 10, "sent-packets", @@ -724,7 +718,7 @@ loop: show_stat("NRSlu", 5, "collisions", new->ift_co - old->ift_co, 1, 1); if (dflag) - show_stat("LSlu", 5, "dropped-packets-out", + show_stat("LSlu", 5, "dropped-packets", new->ift_od - old->ift_od, 1, 1); xo_close_instance("stats"); xo_emit("\n"); |