From d8a84552fb6539eaa2c15882d434e3845d758014 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 16 May 2011 17:20:55 +0200 Subject: libblkid: use stuff from sysfs.h and at.h Signed-off-by: Karel Zak --- lib/sysfs.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/sysfs.c b/lib/sysfs.c index aba12864e..bc380c030 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -152,6 +152,13 @@ int sysfs_stat(struct sysfs_cxt *cxt, const char *attr, struct stat *st) return rc; } +int sysfs_has_attribute(struct sysfs_cxt *cxt, const char *attr) +{ + struct stat st; + + return sysfs_stat(cxt, attr, &st) == 0; +} + static int sysfs_open(struct sysfs_cxt *cxt, const char *attr) { int fd = open_at(cxt->dir_fd, cxt->dir_path, attr, O_RDONLY); -- cgit v1.2.3-55-g7522