@@ -1211,7 +1211,8 @@ static int dm_get_multipath(const char *name, struct multipath **pmpp)
if (!mpp->alias)
return DMP_ERR;
- if ((rc = libmp_mapinfo(DM_MAP_BY_NAME | MAPINFO_MPATH_ONLY,
+ if ((rc = libmp_mapinfo(DM_MAP_BY_NAME | MAPINFO_CHECK_UUID |
+ MAPINFO_MPATH_ONLY,
(mapid_t) { .str = name },
(mapinfo_t) {
.size = &mpp->size,
@@ -1220,9 +1221,6 @@ static int dm_get_multipath(const char *name, struct multipath **pmpp)
})) != DMP_OK)
return rc;
- if (!is_mpath_uuid(uuid))
- return DMP_NO_MATCH;
-
strlcpy(mpp->wwid, uuid + UUID_PREFIX_LEN, sizeof(mpp->wwid));
*pmpp = steal_ptr(mpp);
Instead of seperately calling is_mpath_uuid(), just use MAPINFO_CHECK_UUID when calling libmp_mapinfo. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- libmultipath/devmapper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)