mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 21:04:56 +00:00
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).
This commit is contained in:
parent
ee829065cb
commit
a1e4a0ef67
@ -115,7 +115,11 @@ extern procps_status_t * procps_scan(int save_user_arg0
|
|||||||
else
|
else
|
||||||
curstatus.state[2] = ' ';
|
curstatus.state[2] = ' ';
|
||||||
|
|
||||||
|
#ifdef PAGE_SHIFT
|
||||||
curstatus.rss <<= (PAGE_SHIFT - 10); /* 2**10 = 1kb */
|
curstatus.rss <<= (PAGE_SHIFT - 10); /* 2**10 = 1kb */
|
||||||
|
#else
|
||||||
|
curstatus.rss *= (getpagesize() >> 10); /* 2**10 = 1kb */
|
||||||
|
#endif
|
||||||
|
|
||||||
if(save_user_arg0) {
|
if(save_user_arg0) {
|
||||||
sprintf(status, "/proc/%d/cmdline", pid);
|
sprintf(status, "/proc/%d/cmdline", pid);
|
||||||
|
Loading…
Reference in New Issue
Block a user