diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-22 17:30:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-02-22 17:30:08 +0000 |
commit | 5be21ceaca8f4a5369a6dd62eaa5e3a6ecb7c040 (patch) | |
tree | e18f972d2fe1de45eed34c6d6d60ae0acae96ed2 /bin/ps/keyword.c | |
parent | 8c5505c35af42e2bcffa043c580ea32ff7df5a1b (diff) |
Instead of using MAXCOMLEN from sys/param.h, use KI_MAXCOMLEN as width,
from sysctl.h. This isn't a perfect transition, still thinking about
other ways to do it.
ok millert
Diffstat (limited to 'bin/ps/keyword.c')
-rw-r--r-- | bin/ps/keyword.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 7bef5fbcf87..0075be9da0f 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keyword.c,v 1.49 2022/01/05 04:10:36 guenther Exp $ */ +/* $OpenBSD: keyword.c,v 1.50 2022/02/22 17:30:07 deraadt Exp $ */ /* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */ /*- @@ -30,9 +30,10 @@ * SUCH DAMAGE. */ -#include <sys/param.h> /* MAXCOMLEN */ +#include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> +#include <sys/sysctl.h> #include <err.h> #include <errno.h> @@ -179,7 +180,7 @@ VAR var[] = { {"tsiz", "TSIZ", NULL, 0, tsize, 4}, {"tt", "TT", NULL, LJUST, tname, 3}, {"tty", "TTY", NULL, LJUST, longtname, 8}, - {"ucomm", "UCOMM", NULL, LJUST, ucomm, MAXCOMLEN}, + {"ucomm", "UCOMM", NULL, LJUST, ucomm, KI_MAXCOMLEN}, UID("uid", "UID", pvar, POFF(p_uid)), {"upr", "UPR", NULL, 0, pvar, 3, 0, POFF(p_usrpri), UINT8, "d"}, {"user", "USER", NULL, LJUST, euname, USERLEN}, |