int start = 0;
size_t length;
- page_size = sysconf(_SC_PAGESIZE);
+ page_size = getpagesize();
if (argc)
progname = argv[0];
u32 crc = crc32(0L, Z_NULL, 0);
int c;
- blksize = sysconf(_SC_PAGESIZE);
+ blksize = getpagesize();
total_blocks = 0;
if (argc) {
*
* What to do? Let us allow the user to specify the pagesize explicitly.
*
- * Update 05-Feb-2007 (kzak):
- * - use sysconf(_SC_PAGESIZE) to be consistent with the rest of
- * util-linux code. It is the standardized and preferred way of
- * querying page size.
*/
static int user_pagesize;
static int pagesize;
static void
init_signature_page(void) {
- int kernel_pagesize = pagesize = (int) sysconf(_SC_PAGESIZE);
+ int kernel_pagesize = pagesize = getpagesize();
if (user_pagesize) {
if ((user_pagesize & (user_pagesize-1)) ||
printf (_("max seg size (kbytes) = %lu\n"),
(unsigned long) (shminfo.shmmax >> 10));
printf (_("max total shared memory (kbytes) = %llu\n"),
- sysconf(_SC_PAGESIZE) / 1024 * (unsigned long long) shminfo.shmall);
+ getpagesize() / 1024 * (unsigned long long) shminfo.shmall);
printf (_("min seg size (bytes) = %lu\n"),
(unsigned long) shminfo.shmmin);
return;
int
hlp_pagesize(void)
{
- printf("%d\n", (int) sysconf(_SC_PAGESIZE));
+ printf("%d\n", getpagesize());
return 0;
}