diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-21 11:36:44 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-21 11:36:44 +0000 |
commit | a56e228104a6a6c03de48f5aa0d91bcb7c0e734b (patch) | |
tree | 33638f455593920ce0d87000f85d832812f5071b /libbb | |
parent | 221ee8c20f1dda436d5720ea5fd4b9ab42be89b4 (diff) | |
download | busybox-w32-a56e228104a6a6c03de48f5aa0d91bcb7c0e734b.tar.gz busybox-w32-a56e228104a6a6c03de48f5aa0d91bcb7c0e734b.tar.bz2 busybox-w32-a56e228104a6a6c03de48f5aa0d91bcb7c0e734b.zip |
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).
git-svn-id: svn://busybox.net/trunk/busybox@8324 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/procps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index 44103fae8..252e9c772 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -115,7 +115,11 @@ extern procps_status_t * procps_scan(int save_user_arg0 | |||
115 | else | 115 | else |
116 | curstatus.state[2] = ' '; | 116 | curstatus.state[2] = ' '; |
117 | 117 | ||
118 | #ifdef PAGE_SHIFT | ||
118 | curstatus.rss <<= (PAGE_SHIFT - 10); /* 2**10 = 1kb */ | 119 | curstatus.rss <<= (PAGE_SHIFT - 10); /* 2**10 = 1kb */ |
120 | #else | ||
121 | curstatus.rss *= (getpagesize() >> 10); /* 2**10 = 1kb */ | ||
122 | #endif | ||
119 | 123 | ||
120 | if(save_user_arg0) { | 124 | if(save_user_arg0) { |
121 | sprintf(status, "/proc/%d/cmdline", pid); | 125 | sprintf(status, "/proc/%d/cmdline", pid); |