diff options
author | gad <gad@FreeBSD.org> | 2004-06-20 23:40:54 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2004-06-20 23:40:54 +0000 |
commit | bc86b22810eed37052800ae9d83fe8b80010e0dd (patch) | |
tree | 9b339ad8f456e3d8b5d54d13202af46c1e0b6383 /bin/ps/keyword.c | |
parent | d7e5b117c40a64820465a4c4cfc34ba57fbf955f (diff) | |
download | FreeBSD-src-bc86b22810eed37052800ae9d83fe8b80010e0dd.zip FreeBSD-src-bc86b22810eed37052800ae9d83fe8b80010e0dd.tar.gz |
Add the `-O emul' format option, which prints the name of the system-call
emulation environment the process is in. "emul" as a keyword is picked
up from OpenBSD.
PR: bin/65803
Submitted by: Cyrille Lefevre
Diffstat (limited to 'bin/ps/keyword.c')
-rw-r--r-- | bin/ps/keyword.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index f5aa959..6764b90 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -57,6 +57,7 @@ static int vcmp(const void *, const void *); #define KOFF(x) offsetof(struct kinfo_proc, x) #define ROFF(x) offsetof(struct rusage, x) +#define EMULLEN 13 /* enough for "FreeBSD ELF32" */ #define LWPFMT "d" #define LWPLEN 6 #define NLWPFMT "d" @@ -85,6 +86,8 @@ static VAR var[] = { {"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d", 0}, {"cputime", "", "time", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, + {"emul", "EMUL", NULL, LJUST, emulname, NULL, EMULLEN, 0, CHAR, + NULL, 0}, {"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0}, {"f", "F", NULL, 0, kvar, NULL, 7, KOFF(ki_flag), INT, "x", 0}, {"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, |