diff options
author | jhb <jhb@FreeBSD.org> | 2001-01-24 12:59:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-01-24 12:59:50 +0000 |
commit | 08685e9e9fd9de1e8dc51cada55659344adaf0cc (patch) | |
tree | a4cb36415c6f1e6a29f87158a09a1a9289f0c7f2 /bin/ps | |
parent | 91e8162c0a2cd2e97a0fb4c53fd3d743ce0c7a5b (diff) | |
download | FreeBSD-src-08685e9e9fd9de1e8dc51cada55659344adaf0cc.zip FreeBSD-src-08685e9e9fd9de1e8dc51cada55659344adaf0cc.tar.gz |
- Catch up to new proc flags.
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/print.c | 11 | ||||
-rw-r--r-- | bin/ps/ps.c | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 0ad2b31..34964f5 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -167,13 +167,14 @@ state(k, ve) KINFO *k; VARENT *ve; { - int flag; + int flag, sflag; char *cp; VAR *v; char buf[16]; v = ve->var; flag = k->ki_p->ki_flag; + sflag = k->ki_p->ki_flag; cp = buf; switch (k->ki_p->ki_stat) { @@ -183,7 +184,7 @@ state(k, ve) break; case SSLEEP: - if (flag & P_SINTR) /* interruptable (long) */ + if (sflag & PS_SINTR) /* interruptable (long) */ *cp = k->ki_p->ki_slptime >= MAXSLP ? 'I' : 'S'; else *cp = 'D'; @@ -210,7 +211,7 @@ state(k, ve) *cp = '?'; } cp++; - if (!(flag & P_INMEM)) + if (!(sflag & PS_INMEM)) *cp++ = 'W'; if (k->ki_p->ki_nice < NZERO) *cp++ = '<'; @@ -520,7 +521,7 @@ getpcpu(k) #define fxtofl(fixpt) ((double)(fixpt) / fscale) /* XXX - I don't like this */ - if (k->ki_p->ki_swtime == 0 || (k->ki_p->ki_flag & P_INMEM) == 0) + if (k->ki_p->ki_swtime == 0 || (k->ki_p->ki_sflag & PS_INMEM) == 0) return (0.0); if (rawcpu) return (100.0 * fxtofl(k->ki_p->ki_pctcpu)); @@ -552,7 +553,7 @@ getpmem(k) if (failure) return (0.0); - if ((k->ki_p->ki_flag & P_INMEM) == 0) + if ((k->ki_p->ki_sflag & PS_INMEM) == 0) return (0.0); /* XXX want pmap ptpages, segtab, etc. (per architecture) */ szptudot = UPAGES; diff --git a/bin/ps/ps.c b/bin/ps/ps.c index f919383..324ff6b 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -508,14 +508,14 @@ fmt(fn, ki, comm, maxlen) return (s); } -#define UREADOK(ki) (forceuread || (ki->ki_p->ki_flag & P_INMEM)) +#define UREADOK(ki) (forceuread || (ki->ki_p->ki_sflag & PS_INMEM)) static void saveuser(ki) KINFO *ki; { - if (ki->ki_p->ki_flag & P_INMEM) { + if (ki->ki_p->ki_sflag & PS_INMEM) { /* * The u-area might be swapped out, and we can't get * at it because we have a crashdump and no swap. |