diff options
author | Karel Zak | 2006-12-29 01:13:58 +0100 |
---|---|---|
committer | Karel Zak | 2007-01-04 14:46:25 +0100 |
commit | cdd540c19f6c6360809b320a64f00a938dea4744 (patch) | |
tree | b8cf229c2ecd3c41a9fc699390847d47ab683a22 /sys-utils/ipcs.c | |
parent | ipcs: fix typo in Semaphore headers (diff) | |
download | kernel-qcow2-util-linux-cdd540c19f6c6360809b320a64f00a938dea4744.tar.gz kernel-qcow2-util-linux-cdd540c19f6c6360809b320a64f00a938dea4744.tar.xz kernel-qcow2-util-linux-cdd540c19f6c6360809b320a64f00a938dea4744.zip |
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 <kzak@redhat.com>
Diffstat (limited to 'sys-utils/ipcs.c')
-rw-r--r-- | sys-utils/ipcs.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |