From cdd540c19f6c6360809b320a64f00a938dea4744 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 29 Dec 2006 01:13:58 +0100 Subject: ipcs: max total shared memory in kbytes instead pages The ipcs command has reported "max total shared memory" as a number of pages. The others IPC limits are reported in (k)bytes, so it doesn't make sense mix pages and bytes in the same output. Now "max total shared memory" is reported in kbytes. [Migration note: type="API change", severity="low"] Signed-off-by: Karel Zak --- sys-utils/ipcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys-utils/ipcs.c') diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index 744b56ea1..4c2ec9a02 100644 --- a/sys-utils/ipcs.c +++ b/sys-utils/ipcs.c @@ -279,8 +279,8 @@ void do_shm (char format) (unsigned long) shminfo.shmmni); printf (_("max seg size (kbytes) = %lu\n"), (unsigned long) (shminfo.shmmax >> 10)); - printf (_("max total shared memory (pages) = %lu\n"), - (unsigned long) shminfo.shmall); + printf (_("max total shared memory (kbytes) = %llu\n"), + getpagesize()/1024 * (unsigned long long) shminfo.shmall); printf (_("min seg size (bytes) = %lu\n"), (unsigned long) shminfo.shmmin); return; -- cgit v1.2.3-55-g7522