Use when searching mdadm.conf for a device, use more flexible
matching that e.g. ignores leading /dev/md/ or /dev/
As mdadm now accepts both "/dev/md/foo" and "foo" is many places as
equivalent, they should compare as the same.
Signed-off-by: NeilBrown <neilb@suse.de>
load_conffile();
rv = mddevlist;
while (dev && rv && (rv->devname == NULL
- || strcmp(dev, rv->devname)!=0))
+ || !devname_matches(dev, rv->devname)))
rv = rv->next;
return rv;
}