summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-01-07 03:37:58 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-01-07 03:37:58 +0000
commit9c81f1ddd54f7a1301d238d25c6600201e7e730f (patch)
tree68abd45267a82281dec23aede216c0febd6d5488
parentc64dec7a8832e8b4e79b37dff85466cdeebea71e (diff)
Add p_emul to kinfo_proc2 for ps
-rw-r--r--sys/kern/kern_sysctl.c3
-rw-r--r--sys/sys/sysctl.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index fc6f1cb487b..3c3781366ad 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.94 2004/01/07 02:13:51 millert Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.95 2004/01/07 03:37:57 millert Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -1190,6 +1190,7 @@ fill_kproc2(struct proc *p, struct kinfo_proc2 *ki)
ki->p_xstat = p->p_xstat;
ki->p_acflag = p->p_acflag;
+ strlcpy(ki->p_emul, p->p_emul->e_name, sizeof(ki->p_emul));
strlcpy(ki->p_comm, p->p_comm, sizeof(ki->p_comm));
strncpy(ki->p_login, p->p_session->s_login,
min(sizeof(ki->p_login) - 1, sizeof(p->p_session->s_login)));
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index cdacb92cc53..826c6ec7ff8 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.h,v 1.68 2004/01/07 02:13:51 millert Exp $ */
+/* $OpenBSD: sysctl.h,v 1.69 2004/01/07 03:37:57 millert Exp $ */
/* $NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $ */
/*
@@ -332,6 +332,7 @@ struct kinfo_proc {
#define KI_MAXCOMLEN 24 /* extra for 8 byte alignment */
#define KI_WMESGLEN 8
#define KI_MAXLOGNAME 32
+#define KI_EMULNAMELEN 8
struct kinfo_proc2 {
u_int64_t p_forw; /* PTR: linked run/sleep queue. */
@@ -443,6 +444,7 @@ struct kinfo_proc2 {
u_int64_t p_realflag; /* INT: P_* flags (not including LWPs). */
u_int32_t p_svuid; /* UID_T: saved user id */
u_int32_t p_svgid; /* GID_T: saved group id */
+ char p_emul[KI_EMULNAMELEN]; /* syscall emulation name */
};
/*