summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-11 15:47:10 +1000
committerNeilBrown <neilb@suse.de>2009-05-11 15:47:10 +1000
commit5c4c9ab16d7db67c660570c354e9e75fb6e20ecc (patch)
tree29159055b49bdff9d518e94952912d046003196d
parent0ac91628b93b31636979b637c1ac7258064dea4e (diff)
downloadmdadm-5c4c9ab16d7db67c660570c354e9e75fb6e20ecc.tar.gz
config: enhance name matching in conf_get_ident.
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>
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index 284896e..d171b1e 100644
--- a/config.c
+++ b/config.c
@@ -811,7 +811,7 @@ mddev_ident_t conf_get_ident(char *dev)
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;
}