blockdev: check return when read from sysfs [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
ec8a728ae0
commit
9eaa7292e4
|
@ -455,7 +455,10 @@ static void report_device(char *device, int quiet)
|
|||
err(EXIT_FAILURE,
|
||||
_("%s: failed to initialize sysfs handler"),
|
||||
device);
|
||||
sysfs_read_u64(&cxt, "start", &start);
|
||||
if (sysfs_read_u64(&cxt, "start", &start))
|
||||
err(EXIT_FAILURE,
|
||||
_("%s: failed to read partition start from sysfs"),
|
||||
device);
|
||||
sysfs_deinit(&cxt);
|
||||
}
|
||||
if (ioctl(fd, BLKROGET, &ro) == 0 &&
|
||||
|
|
Loading…
Reference in New Issue