add the emulation in kinfo_proc2

This commit is contained in:
christos 2006-10-29 22:34:07 +00:00
parent d0a868f481
commit ce42f55037
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_sysctl.c,v 1.89 2006/10/03 16:07:12 elad Exp $ */
/* $NetBSD: init_sysctl.c,v 1.90 2006/10/29 22:34:07 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.89 2006/10/03 16:07:12 elad Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.90 2006/10/29 22:34:07 christos Exp $");
#include "opt_sysv.h"
#include "opt_multiprocessor.h"
@ -2990,6 +2990,9 @@ fill_kproc2(struct proc *p, struct kinfo_proc2 *ki)
strncpy(ki->p_login, p->p_session->s_login,
min(sizeof ki->p_login - 1, sizeof p->p_session->s_login));
strncpy(ki->p_ename, p->p_emul->e_name, sizeof(ki->p_ename));
ki->p_ename[sizeof(ki->p_ename) - 1] = '\0';
ki->p_nlwps = p->p_nlwps;
ki->p_nrlwps = p->p_nrlwps;
ki->p_realflag = p->p_flag;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctl.h,v 1.160 2006/10/12 01:32:51 christos Exp $ */
/* $NetBSD: sysctl.h,v 1.161 2006/10/29 22:34:07 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@ -439,6 +439,7 @@ struct kinfo_proc {
#define KI_MAXCOMLEN 24 /* extra for 8 byte alignment */
#define KI_WMESGLEN 8
#define KI_MAXLOGNAME 24 /* extra for 8 byte alignment */
#define KI_MAXEMULLEN 16
#define KI_NOCPU (~(uint64_t)0)
@ -561,6 +562,7 @@ struct kinfo_proc2 {
uint64_t p_realstat; /* LONG: non-LWP process status */
uint32_t p_svuid; /* UID_T: saved user id */
uint32_t p_svgid; /* GID_T: saved group id */
char p_ename[KI_MAXEMULLEN]; /* emulation name */
};
/*