summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2023-03-23 17:50:16 +0100
committerJes Sorensen <jes@trained-monkey.org>2023-05-08 22:23:45 +0200
commit7b3b691ba69b909ea8c172aae693fa2a6938fd14 (patch)
tree6c1394139b0aa0d549f00e7087acdcff1d48dc4c /mdadm.c
parentmdadm: define DEV_NUM_PREF (diff)
downloadmdadm-7b3b691ba69b909ea8c172aae693fa2a6938fd14.tar.xz
mdadm-7b3b691ba69b909ea8c172aae693fa2a6938fd14.zip
mdadm: define is_devname_ignore()
Use function instead of direct checks across code. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mdadm.c b/mdadm.c
index 2296911d..076b45e0 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -154,7 +154,7 @@ int main(int argc, char *argv[])
continue;
case HomeHost:
- if (strcasecmp(optarg, "<ignore>") == 0)
+ if (is_devname_ignore(optarg) == true)
c.require_homehost = 0;
else
c.homehost = optarg;
@@ -1749,8 +1749,7 @@ static int scan_assemble(struct supertype *ss,
int r;
if (a->assembled)
continue;
- if (a->devname &&
- strcasecmp(a->devname, "<ignore>") == 0)
+ if (a->devname && is_devname_ignore(a->devname) == true)
continue;
r = Assemble(ss, a->devname,