diff options
author | Mateusz Kusiak <mateusz.kusiak@intel.com> | 2024-01-18 11:28:41 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-01-24 16:15:04 +0100 |
commit | b823c8f9d65eb7cf3338036c2a3fedf5128dedbc (patch) | |
tree | 52bc23321dfa6a50733389b78e7e1f3f2ef5d363 /maps.c | |
parent | Define sysfs max buffer size (diff) | |
download | mdadm-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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}, |