From: Karel Zak Date: Fri, 29 Dec 2006 00:13:58 +0000 (+0100) Subject: ipcs: max total shared memory in kbytes instead pages X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd540c19f6c6360809b320a64f00a938dea4744;p=util-linux 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 --- diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index 744b56ea..4c2ec9a0 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;