summaryrefslogtreecommitdiffstats
path: root/lib/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sysfs.c')
-rw-r--r--lib/sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sysfs.c b/lib/sysfs.c
index 1b2019112..759d97be6 100644
--- a/lib/sysfs.c
+++ b/lib/sysfs.c
@@ -457,11 +457,12 @@ int sysfs_write_u64(struct sysfs_cxt *cxt, const char *attr, uint64_t num)
char *sysfs_strdup(struct sysfs_cxt *cxt, const char *attr)
{
- char buf[1024];
+ char buf[BUFSIZ];
return sysfs_scanf(cxt, attr, "%1023[^\n]", buf) == 1 ?
strdup(buf) : NULL;
}
+
int sysfs_count_dirents(struct sysfs_cxt *cxt, const char *attr)
{
DIR *dir;