I messed up the patch a bit. Apparently dm_get_uuid() can
return a zero without actually having found a dm name which
matches the name parameter.
Also, I changed dm_get_uuid() so it either returns 1 or a null
string in the uuid return parameter -- in 2 different cases
it was doing neither.
The <dm_device_name> qualifier for the command line
"multipath -ll <dm device name>" can now accept up
to 3 different names for the same dm mapped device,
that is, a user friendly name, an alias in
/etc/multipath.conf, and the current name as
reported by "dmsetup ls".
Edward Goggin, EMC
}
if (dev_type == DEV_DEVMAP) {
- if ((dm_get_uuid(dev, tmpwwid)) == 0) {
+ if (((dm_get_uuid(dev, tmpwwid)) == 0) && (strlen(tmpwwid))) {
refwwid = tmpwwid;
goto out;
}
{
struct dm_task *dmt;
const char *uuidtmp;
+ int r = 1;
dmt = dm_task_create(DM_DEVICE_INFO);
if (!dmt)
else
uuid[0] = '\0';
+ r = 0;
uuidout:
dm_task_destroy(dmt);
-
- return 0;
+ return r;
}
extern int