Date: Thu, 7 Jul 2022 05:20:38 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d961ccd350b2 - main - sockstat(1): print PID adjusted to the right Message-ID: <202207070520.2675Kc0M083661@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d961ccd350b25f3b250cbc3f98dfdf57394ed83e commit d961ccd350b25f3b250cbc3f98dfdf57394ed83e Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-07-07 05:19:08 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2022-07-07 05:19:08 +0000 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 --- usr.bin/sockstat/sockstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207070520.2675Kc0M083661>