diff options
author | Garance A Drosehn <gad@FreeBSD.org> | 2004-06-20 23:40:54 +0000 |
---|---|---|
committer | Garance A Drosehn <gad@FreeBSD.org> | 2004-06-20 23:40:54 +0000 |
commit | 15b87b531ec358685ab1765cb55977b47e06434b (patch) | |
tree | 9b339ad8f456e3d8b5d54d13202af46c1e0b6383 /bin/ps/print.c | |
parent | 5526395941661215d1915a3559d8d6ce2dca669f (diff) | |
download | src-15b87b531ec358685ab1765cb55977b47e06434b.tar.gz src-15b87b531ec358685ab1765cb55977b47e06434b.zip |
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
Notes
Notes:
svn path=/head/; revision=130830
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 76e29abba51b..01e7e1c04256 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -750,6 +750,15 @@ rvar(KINFO *k, VARENT *ve) } void +emulname(KINFO *k, VARENT *ve) +{ + VAR *v; + + v = ve->var; + printf("%-*s", v->width, *k->ki_p->ki_emul ? k->ki_p->ki_emul : "-"); +} + +void label(KINFO *k, VARENT *ve) { char *string; |