summaryrefslogtreecommitdiffstats
path: root/maps.c
diff options
context:
space:
mode:
authorMateusz Kusiak <mateusz.kusiak@intel.com>2024-01-18 11:28:41 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-01-24 16:15:04 +0100
commitb823c8f9d65eb7cf3338036c2a3fedf5128dedbc (patch)
tree52bc23321dfa6a50733389b78e7e1f3f2ef5d363 /maps.c
parentDefine sysfs max buffer size (diff)
downloadmdadm-b823c8f9d65eb7cf3338036c2a3fedf5128dedbc.tar.xz
mdadm-b823c8f9d65eb7cf3338036c2a3fedf5128dedbc.zip
Replace "none" with macro
String "none" is used many times throughout the code. Replace "none" strings with predefined macro. Add str_is_none() for comparing strings with "none". Replace str(n)cmp calls with function. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'maps.c')
-rw-r--r--maps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/maps.c b/maps.c
index b586679a..17f8b54d 100644
--- a/maps.c
+++ b/maps.c
@@ -137,14 +137,14 @@ mapping_t faultylayout[] = {
{ "clear", ClearErrors},
{ "flush", ClearFaults},
- { "none", ClearErrors},
+ { STR_COMMON_NONE, ClearErrors},
{ "default", ClearErrors},
{ NULL, UnSet }
};
mapping_t consistency_policies[] = {
{ "unknown", CONSISTENCY_POLICY_UNKNOWN},
- { "none", CONSISTENCY_POLICY_NONE},
+ { STR_COMMON_NONE, CONSISTENCY_POLICY_NONE},
{ "resync", CONSISTENCY_POLICY_RESYNC},
{ "bitmap", CONSISTENCY_POLICY_BITMAP},
{ "journal", CONSISTENCY_POLICY_JOURNAL},