1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-09 09:40:42 +00:00

Add a new item to kinfo_proc: ki_sflag to mirror p_sflag.

This commit is contained in:
John Baldwin 2001-01-24 12:49:52 +00:00
parent 1b367556b5
commit 6d3e7b9b0b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71577
3 changed files with 5 additions and 2 deletions

View File

@ -182,7 +182,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
kp->ki_sigignore = procsig.ps_sigignore;
kp->ki_sigcatch = procsig.ps_sigcatch;
}
if ((proc.p_flag & P_INMEM) && proc.p_stats != NULL) {
if ((proc.p_sflag & PS_INMEM) && proc.p_stats != NULL) {
if (KREAD(kd, (u_long)proc.p_stats, &pstats)) {
_kvm_err(kd, kd->program,
"can't read stats at %x", proc.p_stats);
@ -311,6 +311,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
kp->ki_slptime = proc.p_slptime;
kp->ki_swtime = proc.p_swtime;
kp->ki_flag = proc.p_flag;
kp->ki_sflag = proc.p_sflag;
kp->ki_wchan = proc.p_wchan;
kp->ki_traceflag = proc.p_traceflag;
kp->ki_priority = proc.p_priority;

View File

@ -432,6 +432,7 @@ fill_kinfo_proc(p, kp)
kp->ki_mtxname[MTXNAMELEN] = 0;
}
kp->ki_stat = p->p_stat;
kp->ki_sflag = p->p_sflag;
kp->ki_pctcpu = p->p_pctcpu;
kp->ki_estcpu = p->p_estcpu;
kp->ki_slptime = p->p_slptime;

View File

@ -143,7 +143,8 @@ struct kinfo_proc {
char ki_sparestrings[102]; /* spare string space */
struct rtprio ki_rtprio; /* Realtime priority */
struct rusage ki_rusage; /* process rusage statistics */
long ki_spare[25]; /* spare constants */
long ki_sflag; /* PS_* flags */
long ki_spare[24]; /* spare constants */
};
void fill_kinfo_proc __P((struct proc *, struct kinfo_proc *));