summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcs.c
diff options
context:
space:
mode:
authorKarel Zak2007-02-06 11:35:15 +0100
committerKarel Zak2007-02-06 11:35:15 +0100
commit7ac3b5b8e3ec944e7cd3bcc6d992882c4d443414 (patch)
tree8670a08ffd55e656893f300ee0a8d75819ff5958 /sys-utils/ipcs.c
parenttests: fix argv[] usage in mnt_test_sysinfo.c (diff)
downloadkernel-qcow2-util-linux-7ac3b5b8e3ec944e7cd3bcc6d992882c4d443414.tar.gz
kernel-qcow2-util-linux-7ac3b5b8e3ec944e7cd3bcc6d992882c4d443414.tar.xz
kernel-qcow2-util-linux-7ac3b5b8e3ec944e7cd3bcc6d992882c4d443414.zip
Clean up pagesize/PAGE_SIZE usage.
Now all code in util-linux uses sysconf(_SC_PAGESIZE) that is standardized and preferred way of querying page size. The asm/page.h file is not included to the code anymore. (This patch doesn't change mount's FS detection code which will be removed later). Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/ipcs.c')
-rw-r--r--sys-utils/ipcs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 4c2ec9a02..0c2316ba1 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -25,6 +25,7 @@
#include <time.h>
#include <pwd.h>
#include <grp.h>
+#include <unistd.h>
#include "nls.h"
/* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */
@@ -280,7 +281,7 @@ void do_shm (char format)
printf (_("max seg size (kbytes) = %lu\n"),
(unsigned long) (shminfo.shmmax >> 10));
printf (_("max total shared memory (kbytes) = %llu\n"),
- getpagesize()/1024 * (unsigned long long) shminfo.shmall);
+ sysconf(_SC_PAGESIZE) / 1024 * (unsigned long long) shminfo.shmall);
printf (_("min seg size (bytes) = %lu\n"),
(unsigned long) shminfo.shmmin);
return;