[BusyBox-cvs] busybox/libbb procps.c,1.11,1.12
Glenn McGrath
bug1 at busybox.net
Wed Jan 21 11:36:47 UTC 2004
Update of /var/cvs/busybox/libbb
In directory nail:/tmp/cvs-serv23372/libbb
Modified Files:
procps.c
Log Message:
Patch from Atsushi Nemoto, recent MIPS kernel headers
does not provide PAGE_SHIFT for userland (because now mips-linux kernel
supports PAGESIZE other than 4K).
Index: procps.c
===================================================================
RCS file: /var/cvs/busybox/libbb/procps.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- procps.c 20 Dec 2003 10:23:28 -0000 1.11
+++ procps.c 21 Jan 2004 11:36:44 -0000 1.12
@@ -115,7 +115,11 @@
else
curstatus.state[2] = ' ';
+#ifdef PAGE_SHIFT
curstatus.rss <<= (PAGE_SHIFT - 10); /* 2**10 = 1kb */
+#else
+ curstatus.rss *= (getpagesize() >> 10); /* 2**10 = 1kb */
+#endif
if(save_user_arg0) {
sprintf(status, "/proc/%d/cmdline", pid);
More information about the busybox-cvs
mailing list