From: Glenn L McGrath Date: Wed, 21 Jan 2004 11:36:44 +0000 (-0000) Subject: Patch from Atsushi Nemoto, recent MIPS kernel headers X-Git-Tag: 1_00_pre6~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a1e4a0ef671f9c1597446e0aafe87f1319c5c527;p=oweals%2Fbusybox.git 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). --- 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 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);