When we're looking for cciss devices in sysfs, they have a "!" not a "/".
If users run multipath on a cciss device using it's devnode name,
/dev/cciss/cXdY, multipath should convert that to the sysfs name.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
return DEV_DEVMAP;
}
+static void
+convert_dev(char *dev)
+{
+ char *ptr = strstr(dev, "cciss/");
+ if (ptr) {
+ ptr += 5;
+ *ptr = '!';
+ }
+}
+
int
main (int argc, char *argv[])
{
strncpy(conf->dev, argv[optind], FILE_NAME_SIZE);
conf->dev_type = get_dev_type(conf->dev);
+ if (conf->dev_type == DEV_DEVNODE)
+ convert_dev(conf->dev);
}
conf->daemon = 0;