diff options
| author | Jamie Landeg-Jones <jamie@catflap.org> | 2026-03-07 01:18:20 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2026-03-07 07:51:14 +0000 |
| commit | 9006a731bc951c5b62efc4bf75a0c5b42586d279 (patch) | |
| tree | 95fec0fe3e3f89f9f12ec937787dc79c34e9d275 /bin/ps | |
| parent | fdc1f34506346fd26db8bfb80ba69d1af844c53a (diff) | |
Diffstat (limited to 'bin/ps')
| -rw-r--r-- | bin/ps/keyword.c | 2 | ||||
| -rw-r--r-- | bin/ps/print.c | 3 | ||||
| -rw-r--r-- | bin/ps/ps.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 0562fd2e4f9d..d7790f9f8c48 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -133,7 +133,7 @@ static VAR keywords[] = { {"mwchan", {NULL}, "MWCHAN", "wait-channel", LJUST, mwchan, 0, UNSPEC, NULL}, {"ni", {"nice"}, NULL, NULL, 0, NULL, 0, UNSPEC, NULL}, - {"nice", {NULL}, "NI", "nice", 0, kvar, KOFF(ki_nice), CHAR, "d"}, + {"nice", {NULL}, "NI", "nice", 0, kvar, KOFF(ki_nice), SCHAR, "d"}, {"nivcsw", {NULL}, "NIVCSW", "involuntary-context-switches", USER, rvar, ROFF(ru_nivcsw), LONG, "ld"}, {"nlwp", {NULL}, "NLWP", "threads", 0, kvar, KOFF(ki_numthreads), diff --git a/bin/ps/print.c b/bin/ps/print.c index f59e843effc1..9705d0c07419 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -754,6 +754,9 @@ printval(void *bp, const VAR *v) case CHAR: (void)asprintf(&str, ofmt, *(char *)bp); break; + case SCHAR: + (void)asprintf(&str, ofmt, *(signed char *)bp); + break; case UCHAR: (void)asprintf(&str, ofmt, *(u_char *)bp); break; diff --git a/bin/ps/ps.h b/bin/ps/ps.h index 065a4c1f1c54..8352f3450f93 100644 --- a/bin/ps/ps.h +++ b/bin/ps/ps.h @@ -33,7 +33,7 @@ #define UNLIMITED 0 /* unlimited terminal width */ enum type { UNSPEC, /* For output routines that don't care and aliases. */ - CHAR, UCHAR, SHORT, USHORT, INT, UINT, LONG, ULONG, KPTR, PGTOK }; + CHAR, SCHAR, UCHAR, SHORT, USHORT, INT, UINT, LONG, ULONG, KPTR, PGTOK }; typedef struct kinfo_str { STAILQ_ENTRY(kinfo_str) ks_next; |
