kpartx: relax and improve UUID check in dm_compare_uuid
authorMartin Wilck <mwilck@suse.com>
Mon, 15 May 2017 15:37:14 +0000 (17:37 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 17 May 2017 21:30:12 +0000 (23:30 +0200)
commit14e6488faa4004e8a05ad17ff69cb37d50f95c5d
tree04960ec95a9e5c26fc817081163e7995ba882997
parent46e1320d1c5155fd69047fc0110dae23d0d6d704
kpartx: relax and improve UUID check in dm_compare_uuid

It is wrong to assume that UUIDs of parent devices always contain
"mpath". Fix that, and make the check for the kpartx-specific prefix
"part%d-" stricter and more explicit.

Moreover, avoid duplication of string constants and properly express
the dependencies of the various constants.

Signed-off-by: Martin Wilck <mwilck@suse.com>
kpartx/devmapper.c