From ae1d23c826fb3bdc59ba6b0fd64e63b7444f02b6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 31 Jan 2024 06:50:23 +0100 Subject: Merging upstream version 4.2+20240118. Signed-off-by: Daniel Baumann --- mdadm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mdadm.c') diff --git a/mdadm.c b/mdadm.c index 62f981d..3f19128 100644 --- a/mdadm.c +++ b/mdadm.c @@ -1099,7 +1099,7 @@ int main(int argc, char *argv[]) exit(2); } if (strcmp(optarg, "internal") == 0 || - strcmp(optarg, "none") == 0 || + strcmp(optarg, STR_COMMON_NONE) == 0 || strchr(optarg, '/') != NULL) { s.bitmap_file = optarg; continue; @@ -1234,13 +1234,12 @@ int main(int argc, char *argv[]) pr_err("PPL consistency policy is only supported for RAID level 5.\n"); exit(2); } else if (s.consistency_policy == CONSISTENCY_POLICY_BITMAP && - (!s.bitmap_file || - strcmp(s.bitmap_file, "none") == 0)) { + (!s.bitmap_file || str_is_none(s.bitmap_file) == true)) { pr_err("--bitmap is required for consistency policy: %s\n", map_num_s(consistency_policies, s.consistency_policy)); exit(2); } else if (s.bitmap_file && - strcmp(s.bitmap_file, "none") != 0 && + str_is_none(s.bitmap_file) == false && s.consistency_policy != CONSISTENCY_POLICY_BITMAP && s.consistency_policy != CONSISTENCY_POLICY_JOURNAL) { pr_err("--bitmap is not compatible with consistency policy: %s\n", -- cgit v1.2.3