diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2022-07-07 05:19:08 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2022-07-07 05:19:08 +0000 |
commit | d961ccd350b25f3b250cbc3f98dfdf57394ed83e (patch) | |
tree | baa084b24a9de78b8b505622027342c0fed1befa /usr.bin | |
parent | 2c436d4890c7ed7f50321725dee229834114166b (diff) | |
download | src-d961ccd350b25f3b250cbc3f98dfdf57394ed83e.tar.gz src-d961ccd350b25f3b250cbc3f98dfdf57394ed83e.zip |
sockstat(1): print PID adjusted to the right
This allows for easy copy-and-paste of a unix(4) peer name for lookup.
With current implementation it is guaranteed that a peer listed could be
found in the output.
Differential revision: https://reviews.freebsd.org/D35727
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sockstat/sockstat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index d813b3adfd42..d607e5ed2983 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -1340,7 +1340,7 @@ display(void) pos += xprintf("%.10s", getprocname(xf->xf_pid)); while (pos < 20) pos += xprintf(" "); - pos += xprintf("%lu ", (u_long)xf->xf_pid); + pos += xprintf("%5lu ", (u_long)xf->xf_pid); while (pos < 26) pos += xprintf(" "); pos += xprintf("%-3d ", xf->xf_fd); |