chiark / gitweb /
[PATCH] udev-test.pl: use more common user/group names
[elogind.git] / libsysfs / sysfs_dir.c
index c86617934bb47c37a5955e0546f9551fe009c9d1..ac3936656caabec9a39b7c052d0d719af248494b 100644 (file)
@@ -150,7 +150,7 @@ int sysfs_read_attribute(struct sysfs_attribute *sysattr)
                errno = EACCES;
                return -1;
        }
-       pgsize = sysconf(_SC_PAGESIZE);
+       pgsize = getpagesize();
        fbuf = (char *)calloc(1, pgsize+1);
        if (!fbuf) {
                dprintf("calloc failed\n");
@@ -244,7 +244,7 @@ int sysfs_write_attribute(struct sysfs_attribute *sysattr,
                close(fd);
                return -1;
        } else if ((unsigned int)length != len) {
-               dprintf("Could not write %d bytes to attribute %s\n", 
+               dprintf("Could not write %zd bytes to attribute %s\n", 
                                        len, sysattr->name);
                /* 
                 * since we could not write user supplied number of bytes,