diff options
author | Peter Wemm <peter@FreeBSD.org> | 2002-09-13 07:13:33 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2002-09-13 07:13:33 +0000 |
commit | 6327ab9cd1f2de1ce377e3481e92ec8e192621a0 (patch) | |
tree | d1294443ce8693362fa04aaf44a4d4af24c3d7e3 /bin/ps/print.c | |
parent | f013345497b83195c60ada3bced0962e402600e5 (diff) | |
download | src-6327ab9cd1f2de1ce377e3481e92ec8e192621a0.tar.gz src-6327ab9cd1f2de1ce377e3481e92ec8e192621a0.zip |
Do not risk using the kernel pgtok() which assumes the page size is
constant.
Notes
Notes:
svn path=/head/; revision=103274
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 123aee86f452..acbb9ccbd261 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #include "lomac.h" #include "ps.h" -static void printval(void *, VAR *); +#define ps_pgtok(a) (((a) * getpagesize()) / 1024) void printheader(void) @@ -477,10 +477,6 @@ mwchan(KINFO *k, VARENT *ve) } } -#ifndef pgtok -#define pgtok(a) (((a)*getpagesize())/1024) -#endif - void vsize(KINFO *k, VARENT *ve) { @@ -629,7 +625,7 @@ tsize(KINFO *k, VARENT *ve) VAR *v; v = ve->var; - (void)printf("%*ld", v->width, (long)pgtok(k->ki_p->ki_tsize)); + (void)printf("%*ld", v->width, (long)ps_pgtok(k->ki_p->ki_tsize)); } void |