1
0
Fork 0

Merging upstream version 4.3+20241108.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:11:53 +01:00
parent 1e24552bfc
commit 60ccb5b596
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
64 changed files with 2015 additions and 1768 deletions

View file

@ -43,6 +43,8 @@
* at compile time via MAP_DIR and MAP_FILE.
*/
#include "mdadm.h"
#include "xmalloc.h"
#include <sys/file.h>
#include <ctype.h>
@ -339,18 +341,14 @@ struct map_ent *map_by_name(struct map_ent **map, char *name)
*/
static char *get_member_info(struct mdstat_ent *ent)
{
char *subarray;
if (ent->metadata_version == NULL ||
strncmp(ent->metadata_version, "external:", 9) != 0)
if (!is_mdstat_ent_subarray(ent))
return NULL;
if (is_subarray(&ent->metadata_version[9])) {
char *subarray;
subarray = strrchr(ent->metadata_version, '/');
subarray = strrchr(ent->metadata_version, '/');
return subarray + 1;
}
return NULL;
return subarray + 1;
}
void RebuildMap(void)