diff options
Diffstat (limited to 'mdopen.c')
-rw-r--r-- | mdopen.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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[0] && strchr(name,'/') == NULL) { char *n = strchr(name, ':'); if (n) n++; else n = name; if (isdigit(*n) && devnum < 0) |