update for changed flags

This commit is contained in:
cgd 1994-05-05 02:04:10 +00:00
parent 72b8de4aa3
commit 25718695be
8 changed files with 31 additions and 32 deletions

View File

@ -33,7 +33,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)keyword.c 5.9 (Berkeley) 6/3/91";*/
static char rcsid[] = "$Id: keyword.c,v 1.4 1993/08/01 18:59:09 mycroft Exp $";
static char rcsid[] = "$Id: keyword.c,v 1.5 1994/05/05 02:04:26 cgd Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -47,7 +47,7 @@ static char rcsid[] = "$Id: keyword.c,v 1.4 1993/08/01 18:59:09 mycroft Exp $";
#include <string.h>
#include "ps.h"
#ifdef SPPWAIT
#ifdef P_PPWAIT
#define NEWVM
#endif
@ -209,7 +209,6 @@ VAR var[] = {
{"oublk", "OUBLK", NULL, USER, rvar, 4, ROFF(ru_oublock), LONG, "d"},
{"oublock", "", "oublk"},
{"p_ru", "P_RU", NULL, 0, pvar, 6, POFF(p_ru), KPTR, "x"},
{"paddr", "PADDR", NULL, 0, evar, 6, EOFF(e_paddr), KPTR, "x"},
{"pagein", "PAGEIN", NULL, USER, pagein, 6},
{"pcpu", "", "%cpu"},
{"pending", "", "sig"},

View File

@ -33,7 +33,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)nlist.c 5.5 (Berkeley) 7/1/91";*/
static char rcsid[] = "$Id: nlist.c,v 1.5 1993/08/01 18:59:08 mycroft Exp $";
static char rcsid[] = "$Id: nlist.c,v 1.6 1994/05/05 02:04:28 cgd Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -44,7 +44,7 @@ static char rcsid[] = "$Id: nlist.c,v 1.5 1993/08/01 18:59:08 mycroft Exp $";
#include <stdio.h>
#include <string.h>
#ifdef SPPWAIT
#ifdef P_PPWAIT
#define NEWVM
#endif

View File

@ -33,7 +33,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)print.c 5.9 (Berkeley) 7/1/91";*/
static char rcsid[] = "$Id: print.c,v 1.9 1993/08/14 12:30:04 mycroft Exp $";
static char rcsid[] = "$Id: print.c,v 1.10 1994/05/05 02:04:30 cgd Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -48,7 +48,7 @@ static char rcsid[] = "$Id: print.c,v 1.9 1993/08/14 12:30:04 mycroft Exp $";
#include <vis.h>
#include "ps.h"
#ifdef SPPWAIT
#ifdef P_PPWAIT
#define NEWVM
#endif
@ -169,10 +169,10 @@ state(k, v)
break;
case SSLEEP:
if (flag & SSINTR) /* interuptable (long) */
if (flag & P_SINTR) /* interuptable (long) */
*cp = p->p_slptime >= MAXSLP ? 'I' : 'S';
else
*cp = (flag & SPAGE) ? 'P' : 'D';
*cp = 'D';
break;
case SRUN:
@ -188,7 +188,7 @@ state(k, v)
*cp = '?';
}
cp++;
if (flag & SLOAD) {
if (flag & P_INMEM) {
#ifndef NEWVM
if (p->p_rssize > p->p_maxrss)
*cp++ = '>';
@ -205,25 +205,25 @@ state(k, v)
else if (flag & SSEQL)
*cp++ = 'S';
#endif
if (flag & STRC)
if (flag & P_TRACED)
*cp++ = 'X';
if (flag & SWEXIT && p->p_stat != SZOMB)
if (flag & P_WEXIT && p->p_stat != SZOMB)
*cp++ = 'E';
#ifdef NEWVM
if (flag & SPPWAIT)
if (flag & P_PPWAIT)
#else
if (flag & SVFORK)
#endif
*cp++ = 'V';
#ifdef NEWVM
if (flag & (SSYS|SLOCK|SKEEP|SPHYSIO))
if (flag & (P_SYSTEM|P_NOSWAP|P_PHYSIO))
#else
if (flag & (SSYS|SLOCK|SULOCK|SKEEP|SPHYSIO))
if (flag & (P_SYSTEM|P_NOSWAP|P_PHYSIO))
#endif
*cp++ = 'L';
if (k->ki_e->e_flag & EPROC_SLEADER)
*cp++ = 's';
if ((flag & SCTTY) && k->ki_e->e_pgid == k->ki_e->e_tpgid)
if ((flag & P_CONTROLT) && k->ki_e->e_pgid == k->ki_e->e_tpgid)
*cp++ = '+';
*cp = '\0';
(void) printf("%-*s", v->width, buf);
@ -460,7 +460,7 @@ getpcpu(k)
#define fxtofl(fixpt) ((double)(fixpt) / fscale)
/* XXX - I don't like this */
if (p->p_time == 0 || (p->p_stat == SZOMB) || (p->p_flag & SLOAD) == 0)
if (p->p_time == 0 || (p->p_stat == SZOMB) || (p->p_flag & P_INMEM) == 0)
return (0.0);
if (rawcpu)
return (100.0 * fxtofl(p->p_pctcpu));
@ -493,7 +493,7 @@ getpmem(k)
p = k->ki_p;
e = k->ki_e;
if ((p->p_flag & SLOAD) == 0 || (p->p_stat == SZOMB))
if ((p->p_flag & P_INMEM) == 0 || (p->p_stat == SZOMB))
return (0.0);
#ifndef NEWVM
szptudot = UPAGES + clrnd(ctopt(p->p_dsize + p->p_ssize + e->e_xsize));

View File

@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)ps.c 5.43 (Berkeley) 7/1/91";*/
static char rcsid[] = "$Id: ps.c,v 1.9 1993/10/07 00:46:02 cgd Exp $";
static char rcsid[] = "$Id: ps.c,v 1.10 1994/05/05 02:04:31 cgd Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -60,7 +60,7 @@ static char rcsid[] = "$Id: ps.c,v 1.9 1993/10/07 00:46:02 cgd Exp $";
#include <paths.h>
#include "ps.h"
#ifdef SPPWAIT
#ifdef P_PPWAIT
#define NEWVM
#endif
@ -311,7 +311,7 @@ main(argc, argv)
*/
for (i = lineno = 0; i < nentries; i++) {
if (xflg == 0 && (kinfo[i].ki_e->e_tdev == NODEV ||
(kinfo[i].ki_p->p_flag & SCTTY ) == 0))
(kinfo[i].ki_p->p_flag & P_CONTROLT) == 0))
continue;
for (vent = vhead; vent; vent = vent->next) {
(*vent->var->oproc)(&kinfo[i], vent->var, vent->next);

View File

@ -35,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "from: @(#)kvm.c 5.18 (Berkeley) 5/7/91";*/
static char rcsid[] = "$Id: kvm.c,v 1.32 1994/04/23 02:42:01 briggs Exp $";
static char rcsid[] = "$Id: kvm.c,v 1.33 1994/05/05 02:04:10 cgd Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -537,7 +537,7 @@ again:
seterr("can't read session at %x", pgrp.pg_session);
return (-1);
}
if ((proc.p_flag&SCTTY) && sess.s_ttyp != NULL) {
if ((proc.p_flag&P_CONTROLT) && sess.s_ttyp != NULL) {
if (kvm_read(sess.s_ttyp, &tty, sizeof (struct tty))
== -1) {
seterr("can't read tty at %x", sess.s_ttyp);
@ -572,7 +572,7 @@ again:
break;
case KINFO_PROC_TTY:
if ((proc.p_flag&SCTTY) == 0 ||
if ((proc.p_flag&P_CONTROLT) == 0 ||
eproc.e_tdev != (dev_t)arg)
continue;
break;
@ -649,7 +649,7 @@ kvm_getu(p)
return (NULL);
}
if ((p->p_flag & SLOAD) == 0) {
if ((p->p_flag & P_INMEM) == 0) {
vm_offset_t maddr;
if (swap < 0) {

View File

@ -1,2 +1,2 @@
major=2
major=3
minor=0

View File

@ -33,7 +33,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)proc_compare.c 5.4 (Berkeley) 2/7/91";*/
static char rcsid[] = "$Id: proc_compare.c,v 1.2 1993/08/01 18:03:16 mycroft Exp $";
static char rcsid[] = "$Id: proc_compare.c,v 1.3 1994/05/05 02:08:57 cgd Exp $";
#endif /* not lint */
/*
@ -117,9 +117,9 @@ proc_compare(p1, p2)
/*
* favor one sleeping in a non-interruptible sleep
*/
if (p1->p_flag&SSINTR && (p2->p_flag&SSINTR) == 0)
if (p1->p_flag&P_SINTR && (p2->p_flag&P_SINTR) == 0)
return (1);
if (p2->p_flag&SSINTR && (p1->p_flag&SSINTR) == 0)
if (p2->p_flag&P_SINTR && (p1->p_flag&P_SINTR) == 0)
return (0);
return(p2->p_pid > p1->p_pid); /* tie - return highest pid */
}

View File

@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)w.c 5.29 (Berkeley) 4/23/91";*/
static char rcsid[] = "$Id: w.c,v 1.9 1993/10/26 20:52:51 mycroft Exp $";
static char rcsid[] = "$Id: w.c,v 1.10 1994/05/05 02:08:58 cgd Exp $";
#endif /* not lint */
/*
@ -64,7 +64,7 @@ static char rcsid[] = "$Id: w.c,v 1.9 1993/10/26 20:52:51 mycroft Exp $";
#include <stdio.h>
#include <vis.h>
#ifdef SPPWAIT
#ifdef P_PPWAIT
#define NEWVM
#endif
#ifndef NEWVM
@ -242,7 +242,7 @@ main(argc, argv)
}
while ((p = kvm_nextproc()) != NULL) {
if (p->p_stat == SZOMB || (p->p_flag & SCTTY) == 0)
if (p->p_stat == SZOMB || (p->p_flag & P_CONTROLT) == 0)
continue;
e = kvm_geteproc(p);
for (ep = ehead; ep != NULL; ep = ep->next) {