diff options
author | des <des@FreeBSD.org> | 2009-01-30 14:28:50 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2009-01-30 14:28:50 +0000 |
commit | 62cee65dbe25eb1b3e3ceac3074c771f3cc5dfa2 (patch) | |
tree | f5b1b2ac4b5c99539af2c57b715e14a0cbbe7e9d /usr.bin/sockstat | |
parent | 5235e020629db080bd11fb2a0586a720e29d3848 (diff) | |
download | FreeBSD-src-62cee65dbe25eb1b3e3ceac3074c771f3cc5dfa2.zip FreeBSD-src-62cee65dbe25eb1b3e3ceac3074c771f3cc5dfa2.tar.gz |
Make sure the entries don't run into each other when they're longer than
the allotted space.
PR: bin/129318
Submitted by: Ighighi <ighighi@gmail.com>
MFC after: 3 weeks
Diffstat (limited to 'usr.bin/sockstat')
-rw-r--r-- | usr.bin/sockstat/sockstat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 627c958..2cc3de2 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -596,25 +596,25 @@ display(void) continue; pos = 0; if ((pwd = getpwuid(xf->xf_uid)) == NULL) - pos += xprintf("%lu", (u_long)xf->xf_uid); + pos += xprintf("%lu ", (u_long)xf->xf_uid); else - pos += xprintf("%s", pwd->pw_name); + pos += xprintf("%s ", pwd->pw_name); while (pos < 9) pos += xprintf(" "); pos += xprintf("%.10s", getprocname(xf->xf_pid)); while (pos < 20) pos += xprintf(" "); - pos += xprintf("%lu", (u_long)xf->xf_pid); + pos += xprintf("%lu ", (u_long)xf->xf_pid); while (pos < 26) pos += xprintf(" "); - pos += xprintf("%d", xf->xf_fd); + pos += xprintf("%d ", xf->xf_fd); while (pos < 29) pos += xprintf(" "); pos += xprintf("%s", s->protoname); if (s->vflag & INP_IPV4) - pos += xprintf("4"); + pos += xprintf("4 "); if (s->vflag & INP_IPV6) - pos += xprintf("6"); + pos += xprintf("6 "); while (pos < 36) pos += xprintf(" "); switch (s->family) { |