summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorKarel Zak2018-06-20 16:41:51 +0200
committerKarel Zak2018-06-21 13:19:28 +0200
commit905bc7817ecae1df10e32bed2a0a68c11928ddc9 (patch)
treebbb1dba28fafcbf31dd2ab5619eab94e84ee856c /misc-utils
parenttests: add simple ATA and NVME lsblk dump (diff)
downloadkernel-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')
-rw-r--r--misc-utils/lsblk.c2
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, "-");