diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-09-03 13:51:42 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-09-03 13:51:42 +0000 |
commit | 3a39e3634a4a696b7626c03d146dce51de363aa3 (patch) | |
tree | 3f099033fa6bdcbdc31b4330a0f32150d18da356 | |
parent | c8f99376942801efe48f4616d120f80357c1a6c4 (diff) |
add ps "emul" option
-rw-r--r-- | bin/ps/extern.h | 3 | ||||
-rw-r--r-- | bin/ps/keyword.c | 5 | ||||
-rw-r--r-- | bin/ps/print.c | 17 |
3 files changed, 20 insertions, 5 deletions
diff --git a/bin/ps/extern.h b/bin/ps/extern.h index 66785bf753b..a8f87664c6b 100644 --- a/bin/ps/extern.h +++ b/bin/ps/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.4 1997/08/22 20:08:13 kstailey Exp $ */ +/* $OpenBSD: extern.h,v 1.5 1997/09/03 13:51:39 kstailey Exp $ */ /* $NetBSD: extern.h,v 1.10 1995/05/21 13:38:27 mycroft Exp $ */ /*- @@ -52,6 +52,7 @@ void command __P((KINFO *, VARENT *)); void cputime __P((KINFO *, VARENT *)); int donlist __P((void)); void evar __P((KINFO *, VARENT *)); +void emulname __P((KINFO *, VARENT *)); void fmt_puts __P((char *, int *)); void fmt_putc __P((int, int *)); double getpcpu __P((KINFO *)); diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index b6445cfe031..485c776d65d 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keyword.c,v 1.10 1997/08/22 20:08:14 kstailey Exp $ */ +/* $OpenBSD: keyword.c,v 1.11 1997/09/03 13:51:40 kstailey Exp $ */ /* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: keyword.c,v 1.10 1997/08/22 20:08:14 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: keyword.c,v 1.11 1997/09/03 13:51:40 kstailey Exp $"; #endif #endif /* not lint */ @@ -102,6 +102,7 @@ VAR var[] = { {"command", "COMMAND", NULL, COMM|LJUST|USER, command, 16}, {"cpu", "CPU", NULL, 0, pvar, 3, 0, POFF(p_estcpu), UINT, "d"}, {"cputime", "", "time"}, + {"emul", "EMUL", NULL, LJUST, emulname, EMULNAMELEN}, {"etime", "", "start"}, {"f", "F", NULL, 0, pvar, 7, 0, POFF(p_flag), INT, "x"}, {"flags", "", "f"}, diff --git a/bin/ps/print.c b/bin/ps/print.c index 5c4b1fe67cf..eebca4e025e 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.8 1997/09/01 18:30:19 deraadt Exp $ */ +/* $OpenBSD: print.c,v 1.9 1997/09/03 13:51:41 kstailey Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.8 1997/09/01 18:30:19 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.9 1997/09/03 13:51:41 kstailey Exp $"; #endif #endif /* not lint */ @@ -748,3 +748,16 @@ rvar(k, ve) else (void)printf("%*s", v->width, "-"); } + +void +emulname(k, ve) + KINFO *k; + VARENT *ve; +{ + VAR *v; + + v = ve->var; + + (void)printf("%-*s", + (int)v->width, KI_EPROC(k)->e_emul); +} |