Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153364424
D54567.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1012 B
Referenced Files
None
Subscribers
None
D54567.diff
View Options
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -394,11 +394,10 @@
if (istcp && (tp->t_flags & TF_TOE) != 0)
xo_emit("{:protocol/%-3.3s%-6.6s/%s%s} ", "toe", vchar);
else {
- int len;
+ int l = max (2, 9 - strlen(name));
- len = max (2, 9 - strlen(name));
- xo_emit("{:protocol/%.7s%-*.*s/%s%s} ", name, len, len,
- vchar);
+ xo_emit("{d:protocol/%.7s%-*.*s} ", name, l, l, vchar);
+ xo_emit("{e:protocol/%s%s}", name, vchar);
}
if (Lflag) {
char buf1[33];
@@ -523,9 +522,9 @@
}
if (istcp && !Lflag && !xflag && !Tflag && !Rflag) {
if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES)
- xo_emit("{:tcp-state/%-11d}", tp->t_state);
+ xo_emit("{:tcp-state/%-11d/%d}", tp->t_state);
else {
- xo_emit("{:tcp-state/%-11s}",
+ xo_emit("{:tcp-state/%-11s/%s}",
tcpstates[tp->t_state]);
#if defined(TF_NEEDSYN) && defined(TF_NEEDFIN)
/* Show T/TCP `hidden state' */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 5:47 PM (12 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31911951
Default Alt Text
D54567.diff (1012 B)
Attached To
Mode
D54567: netstat: fix a segfault with --libxo
Attached
Detach File
Event Timeline
Log In to Comment