Merging upstream version 4.2+20240118.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ca87d3e0c7
commit
e23dbbb353
29 changed files with 158 additions and 229 deletions
18
mdadm.h
18
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue