summaryrefslogtreecommitdiff
path: root/Monitor.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-04 20:50:38 +1100
committerNeilBrown <neilb@suse.de>2008-11-04 20:50:38 +1100
commitfe056d1fb0b1d08c614f574cceaa640abc382544 (patch)
tree2ee2ebca04e23a7dc912fdef7c4f7bd95066a17c /Monitor.c
parent215bb3f77627d818d5bc3eaca190212d491e1fcf (diff)
config: Don't require an array to have a device name.
i.e. in mdadm.conf you can have a line like ARRAY uuid=whatever and it will use auto-name-generation to give a name to the array at assemble-time. The is different from blind auto-assembly in that the array will be treated as 'local'.
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Monitor.c b/Monitor.c
index 1c190577..0e2e6bc7 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -165,7 +165,10 @@ int Monitor(mddev_dev_t devlist,
if (devlist == NULL) {
mddev_ident_t mdlist = conf_get_ident(NULL);
for (; mdlist; mdlist=mdlist->next) {
- struct state *st = malloc(sizeof *st);
+ struct state *st;
+ if (mdlist->devname == NULL)
+ continue;
+ st = malloc(sizeof *st);
if (st == NULL)
continue;
st->devname = strdup(mdlist->devname);