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 b4fb7cdda..ad90c19c8 100644
--- a/lib/sysfs.c
+++ b/lib/sysfs.c
@@ -622,7 +622,8 @@ int main(int argc, char *argv[])
printf("PARTITION: %s\n",
sysfs_devno_has_attribute(devno, "partition") ? "YES" : "NOT");
- sysfs_init(&cxt, devno, NULL);
+ if (sysfs_init(&cxt, devno, NULL))
+ return EXIT_FAILURE;
len = sysfs_readlink(&cxt, NULL, path, sizeof(path) - 1);
if (len > 0) {