summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/Assemble.c b/Assemble.c
index 77f2b50..87d1ae0 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -23,6 +23,8 @@
*/
#include "mdadm.h"
+#include "xmalloc.h"
+
#include <ctype.h>
mapping_t assemble_statuses[] = {
@@ -114,14 +116,11 @@ static int is_member_busy(char *metadata_version)
int busy = 0;
for (ent = mdstat; ent; ent = ent->next) {
- if (ent->metadata_version == NULL)
- continue;
- if (strncmp(ent->metadata_version, "external:", 9) != 0)
- continue;
- if (!is_subarray(&ent->metadata_version[9]))
+ if (!is_mdstat_ent_subarray(ent))
continue;
+
/* Skip first char - it can be '/' or '-' */
- if (strcmp(&ent->metadata_version[10], metadata_version+1) == 0) {
+ if (strcmp(&ent->metadata_version[10], metadata_version + 1) == 0) {
busy = 1;
break;
}
@@ -1574,8 +1573,7 @@ try_again:
/* Ignore 'host:' prefix of name */
name = strchr(name, ':')+1;
- mdfd = create_mddev(mddev, name, ident->autof, trustworthy,
- chosen_name, 0);
+ mdfd = create_mddev(mddev, name, trustworthy, chosen_name, 0);
}
if (mdfd < 0) {
st->ss->free_super(st);