From 09e7af977a9c3aa17fc324806c8ba6d8a7ab3c72 Mon Sep 17 00:00:00 2001 From: maxim Date: Tue, 30 Mar 2010 09:58:21 +0000 Subject: [PATCH] o Make sockstat -6 output more readable for long ipv6 addresses (most of them apart from ::1): put a whitespace between local and remote address:port pairs. PR: bin/145194 Submitted by: Fedor Dikarev MFC after: 2 weeks --- usr.bin/sockstat/sockstat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 1a5af429fdb7..2242c4e79043 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -621,6 +621,8 @@ display(void) case AF_INET: case AF_INET6: pos += printaddr(s->family, &s->laddr); + if (s->family == AF_INET6 && pos >= 58) + pos += xprintf(" "); while (pos < 58) pos += xprintf(" "); pos += printaddr(s->family, &s->faddr);