chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] klibc: remove SCCS directories from the temporary klibc install
[elogind.git]
/
libsysfs
/
sysfs_dir.c
diff --git
a/libsysfs/sysfs_dir.c
b/libsysfs/sysfs_dir.c
index c86617934bb47c37a5955e0546f9551fe009c9d1..ac3936656caabec9a39b7c052d0d719af248494b 100644
(file)
--- a/
libsysfs/sysfs_dir.c
+++ b/
libsysfs/sysfs_dir.c
@@
-150,7
+150,7
@@
int sysfs_read_attribute(struct sysfs_attribute *sysattr)
errno = EACCES;
return -1;
}
errno = EACCES;
return -1;
}
- pgsize =
sysconf(_SC_PAGESIZE
);
+ pgsize =
getpagesize(
);
fbuf = (char *)calloc(1, pgsize+1);
if (!fbuf) {
dprintf("calloc failed\n");
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) {
close(fd);
return -1;
} else if ((unsigned int)length != len) {
- dprintf("Could not write %d bytes to attribute %s\n",
+ dprintf("Could not write %
z
d bytes to attribute %s\n",
len, sysattr->name);
/*
* since we could not write user supplied number of bytes,
len, sysattr->name);
/*
* since we could not write user supplied number of bytes,