summaryrefslogtreecommitdiffstats
path: root/mdadm.h
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.h
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.h')
-rw-r--r--mdadm.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index 8dcd8b8..709b610 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -767,6 +767,8 @@ enum sysfs_read_flags {
GET_DEVS_ALL = (1 << 27),
};
+#define SYSFS_MAX_BUF_SIZE 64
+
/* If fd >= 0, get the array it is open on,
* else use devnm.
*/
@@ -2025,3 +2027,19 @@ static inline int is_container(const int level)
return 1;
return 0;
}
+
+#define STR_COMMON_NONE "none"
+
+/**
+ * str_is_none() - check if @str starts with "none".
+ * @str: string
+ *
+ * return:
+ * true if string starts with "none", false otherwise.
+ */
+static inline bool str_is_none(char *str)
+{
+ if (strncmp(str, STR_COMMON_NONE, sizeof(STR_COMMON_NONE) - 1) == 0)
+ return true;
+ return false;
+}