From: Martin Wilck <mwilck@xxxxxxxx> If get_refwwid is called with a dev_t argument, there's no point in converting it into a devname first. If the device doesn't exist, get_udev_device() will fail. Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- libmultipath/configure.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 75e11fd..e8d6db8 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -1414,17 +1414,15 @@ int get_refwwid(enum mpath_cmds cmd, char *dev, enum devtypes dev_type, if (dev_type == DEV_DEVT) { strchop(dev); - if (devt2devname(buff, FILE_NAME_SIZE, dev)) { - condlog(0, "%s: cannot find block device\n", dev); - return 1; - } - pp = find_path_by_dev(pathvec, buff); + pp = find_path_by_devt(pathvec, dev); if (!pp) { struct udev_device *udevice = get_udev_device(dev, dev_type); - if (!udevice) + if (!udevice) { + condlog(0, "%s: cannot find block device", dev); return 1; + } conf = get_multipath_config(); pthread_cleanup_push(put_multipath_config, conf); -- 2.26.2 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel