summaryrefslogtreecommitdiff
path: root/mdopen.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-10-30 09:48:18 +1100
committerNeilBrown <neilb@suse.de>2008-10-30 09:48:18 +1100
commit7b403fef7e97c16e1eb63773a278eb65c6dfd9a8 (patch)
treedda769235b0def1cf0de415b9233338717919af1 /mdopen.c
parent4ef2f11e28800373f045e1f0c1336f13f89b79c9 (diff)
Incremental: allow assembly of foreign array.
If a foreign (i.e. not known to be local) array is discovered by --incremental assembly, we now assemble it. However we ignore any name information in the array so as not to potentially create a name that conflict with a 'local' array. Also, foreign arrays are always assembled 'read-auto' to avoid writing anything until the array is actually used. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdopen.c')
-rw-r--r--mdopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdopen.c b/mdopen.c
index 4fbcb484..9250e4ba 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -282,7 +282,7 @@ int open_mddev_devnum(char *devname, int devnum, char *name,
if (devname)
strcpy(chosen_name, devname);
- else if (name && strchr(name,'/') == NULL) {
+ else if (name && *name && strchr(name,'/') == NULL) {
char *n = strchr(name, ':');
if (n) n++; else n = name;
if (isdigit(*n) && devnum < 0)