From 31ec424d708de73ad37b030c919fa7b8890cb1c6 Mon Sep 17 00:00:00 2001 From: Christophe Varoqui Date: Mon, 31 Oct 2005 12:12:05 +0100 Subject: [PATCH] [multipathd] "add map" cli command to accept map names as param --- multipathd/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index 7d30d09..7e0bb9c 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -725,10 +725,10 @@ uev_remove_map (char * devname, struct vectors * vecs) int minor; struct multipath * mpp; - if (sscanf(devname, "dm-%d", &minor) != 1) - return 1; - - mpp = find_mp_by_minor(vecs->mpvec, minor); + if (sscanf(devname, "dm-%d", &minor) == 1) + mpp = find_mp_by_minor(vecs->mpvec, minor); + else + mpp = find_mp_by_alias(vecs->mpvec, devname); if (!mpp) { condlog(3, "%s: devmap not registered, can't remove", -- 2.7.4