diff options
author | Karel Zak | 2018-06-20 16:41:51 +0200 |
---|---|---|
committer | Karel Zak | 2018-06-21 13:19:28 +0200 |
commit | 905bc7817ecae1df10e32bed2a0a68c11928ddc9 (patch) | |
tree | bbb1dba28fafcbf31dd2ab5619eab94e84ee856c /misc-utils/lsblk.c | |
parent | tests: add simple ATA and NVME lsblk dump (diff) | |
download | kernel-qcow2-util-linux-905bc7817ecae1df10e32bed2a0a68c11928ddc9.tar.gz kernel-qcow2-util-linux-905bc7817ecae1df10e32bed2a0a68c11928ddc9.tar.xz kernel-qcow2-util-linux-905bc7817ecae1df10e32bed2a0a68c11928ddc9.zip |
lsblk: fix ul_path_read_string() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r-- | misc-utils/lsblk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index a6c78a268..815ba1d71 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -716,7 +716,7 @@ static char *get_type(struct blkdev_cxt *cxt) /* The DM_UUID prefix should be set to subsystem owning * the device - LVM, CRYPT, DMRAID, MPATH, PART */ - if (ul_path_read_string(cxt->sysfs, &dm_uuid, "dm/uuid") == 0 + if (ul_path_read_string(cxt->sysfs, &dm_uuid, "dm/uuid") > 0 && dm_uuid) { char *tmp = dm_uuid; char *dm_uuid_prefix = strsep(&tmp, "-"); |