git: c31cc4376dac - stable/15 - sockstat: improve consistency
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 23 Oct 2026 18:28:42 UTC
The branch stable/15 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=c31cc4376dac87067c03c64e6bb1227f92b7fe0a
commit c31cc4376dac87067c03c64e6bb1227f92b7fe0a
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-08-23 19:55:51 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-10-23 18:27:50 +0000
sockstat: improve consistency
Include the entries of the BBLOG STATE column in the computation
of the column width as done also for other columns.
Also set first to falso only when needed.
Sponsored by: Netflix, Inc.
(cherry picked from commit 732c8d2a1a0e169bad1c02b1e54a4306861bde4a)
---
usr.bin/sockstat/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c
index df09245a8f0d..f334ba13d681 100644
--- a/usr.bin/sockstat/main.c
+++ b/usr.bin/sockstat/main.c
@@ -1318,12 +1318,16 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s)
len = strlen(s->cc);
cw->cc = MAX(cw->cc, len);
}
+ if (opt_b && s->proto == IPPROTO_TCP) {
+ len = strlen(bblog_state(s->bblog_state));
+ cw->bblog_state = MAX(cw->bblog_state, len);
+ }
+ first = false;
}
if (laddr != NULL)
laddr = laddr->next;
if (faddr != NULL)
faddr = faddr->next;
- first = false;
}
}