]> err.no Git - util-linux/commitdiff
ipcs: max total shared memory in kbytes instead pages
authorKarel Zak <kzak@redhat.com>
Fri, 29 Dec 2006 00:13:58 +0000 (01:13 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 4 Jan 2007 13:46:25 +0000 (14:46 +0100)
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 <kzak@redhat.com>
sys-utils/ipcs.c

index 744b56ea1b69345a48d6e9c012a27fb023be2488..4c2ec9a0242751b652c4f142a4a785414e62530f 100644 (file)
@@ -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;