diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-21 11:36:44 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-21 11:36:44 +0000 |
commit | a1e4a0ef671f9c1597446e0aafe87f1319c5c527 (patch) | |
tree | 33638f455593920ce0d87000f85d832812f5071b | |
parent | ee829065cb7c52e3dfb74b35939ef08b9578a0b5 (diff) | |
download | busybox-w32-a1e4a0ef671f9c1597446e0aafe87f1319c5c527.tar.gz busybox-w32-a1e4a0ef671f9c1597446e0aafe87f1319c5c527.tar.bz2 busybox-w32-a1e4a0ef671f9c1597446e0aafe87f1319c5c527.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).
-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); |