diff options
author | NeilBrown <neilb@suse.de> | 2008-11-04 20:50:38 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-04 20:50:38 +1100 |
commit | fe056d1fb0b1d08c614f574cceaa640abc382544 (patch) | |
tree | 2ee2ebca04e23a7dc912fdef7c4f7bd95066a17c /Monitor.c | |
parent | 215bb3f77627d818d5bc3eaca190212d491e1fcf (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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |