Add support for printing the emulation of the process.

This commit is contained in:
christos 2006-10-29 22:32:53 +00:00
parent d566a2d50f
commit d0a868f481
3 changed files with 18 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.29 2006/10/02 17:54:35 apb Exp $ */
/* $NetBSD: extern.h,v 1.30 2006/10/29 22:32:53 christos Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -70,6 +70,7 @@ void parsefmt(const char *);
void parsefmt_insert(const char *, VARENT **);
void parsesort(const char *);
VARENT * varlist_find(VARLIST *, const char *);
void emul(void *, VARENT *, int);
void pcpu(void *, VARENT *, int);
void pmem(void *, VARENT *, int);
void pnice(void *, VARENT *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: keyword.c,v 1.49 2006/10/16 00:31:47 christos Exp $ */
/* $NetBSD: keyword.c,v 1.50 2006/10/29 22:32:53 christos Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: keyword.c,v 1.49 2006/10/16 00:31:47 christos Exp $");
__RCSID("$NetBSD: keyword.c,v 1.50 2006/10/29 22:32:53 christos Exp $");
#endif
#endif /* not lint */
@ -122,6 +122,7 @@ VAR var[] = {
VAR6("ctime", "CTIME", 0, putimeval, POFF(p_uctime_sec), TIMEVAL),
GID("egid", "EGID", p_gid),
VAR4("egroup", "EGROUP", LJUST, gname),
VAR4("emul", "EMUL", LJUST, emul),
VAR6("etime", "ELAPSED", 0, elapsed, POFF(p_ustart_sec), TIMEVAL),
UID("euid", "EUID", p_uid),
VAR4("euser", "EUSER", LJUST, uname),

View File

@ -1,4 +1,4 @@
/* $NetBSD: print.c,v 1.95 2006/10/02 17:54:35 apb Exp $ */
/* $NetBSD: print.c,v 1.96 2006/10/29 22:32:53 christos Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -70,7 +70,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
__RCSID("$NetBSD: print.c,v 1.95 2006/10/02 17:54:35 apb Exp $");
__RCSID("$NetBSD: print.c,v 1.96 2006/10/29 22:32:53 christos Exp $");
#endif
#endif /* not lint */
@ -455,6 +455,17 @@ ucomm(void *arg, VARENT *ve, int mode)
strprintorsetwidth(v, k->p_comm, mode);
}
void
emul(void *arg, VARENT *ve, int mode)
{
struct kinfo_proc2 *k;
VAR *v;
k = arg;
v = ve->var;
strprintorsetwidth(v, k->p_ename, mode);
}
void
logname(void *arg, VARENT *ve, int mode)
{