summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2004-06-20 23:40:54 +0000
committergad <gad@FreeBSD.org>2004-06-20 23:40:54 +0000
commitbc86b22810eed37052800ae9d83fe8b80010e0dd (patch)
tree9b339ad8f456e3d8b5d54d13202af46c1e0b6383 /bin/ps/print.c
parentd7e5b117c40a64820465a4c4cfc34ba57fbf955f (diff)
downloadFreeBSD-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/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 76e29ab..01e7e1c 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;
OpenPOWER on IntegriCloud