From bc86b22810eed37052800ae9d83fe8b80010e0dd Mon Sep 17 00:00:00 2001 From: gad Date: Sun, 20 Jun 2004 23:40:54 +0000 Subject: 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 --- bin/ps/print.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bin/ps/print.c') 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; -- cgit v1.1