diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sysfs.c | 3 |
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) { |