summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:50:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:50:23 +0000
commitae1d23c826fb3bdc59ba6b0fd64e63b7444f02b6 (patch)
treef4e9c8932fa94f04eacf2118964bf3a54e5ecfe6 /mdadm.c
parentReleasing debian version 4.2+20231121-1. (diff)
downloadmdadm-ae1d23c826fb3bdc59ba6b0fd64e63b7444f02b6.tar.xz
mdadm-ae1d23c826fb3bdc59ba6b0fd64e63b7444f02b6.zip
Merging upstream version 4.2+20240118.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c7
1 files changed, 3 insertions, 4 deletions
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",