summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-09-13 07:13:33 +0000
committerpeter <peter@FreeBSD.org>2002-09-13 07:13:33 +0000
commitc8f83170c0d331e6a16675360a650cd0abbf5cb8 (patch)
treed1294443ce8693362fa04aaf44a4d4af24c3d7e3 /bin/ps/print.c
parent671ab71ae0d88f09553e46463e776041bc0db863 (diff)
downloadFreeBSD-src-c8f83170c0d331e6a16675360a650cd0abbf5cb8.zip
FreeBSD-src-c8f83170c0d331e6a16675360a650cd0abbf5cb8.tar.gz
Do not risk using the kernel pgtok() which assumes the page size is
constant.
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 123aee8..acbb9cc 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
OpenPOWER on IntegriCloud