aboutsummaryrefslogtreecommitdiff
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorGarance A Drosehn <gad@FreeBSD.org>2004-06-20 23:40:54 +0000
committerGarance A Drosehn <gad@FreeBSD.org>2004-06-20 23:40:54 +0000
commit15b87b531ec358685ab1765cb55977b47e06434b (patch)
tree9b339ad8f456e3d8b5d54d13202af46c1e0b6383 /bin/ps/print.c
parent5526395941661215d1915a3559d8d6ce2dca669f (diff)
downloadsrc-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.c9
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;