diff options
author | NeilBrown <neilb@suse.de> | 2011-05-10 08:17:12 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-05-10 08:17:12 +0200 |
commit | 0f23aa88f81127eae744d60eedd4884f021562d0 (patch) | |
tree | ba1e8d2580b719277f0df8b98beea0a859b5dd08 /config.c | |
parent | Grow: allow auto-readonly arrays to be reshaped. (diff) | |
download | mdadm-0f23aa88f81127eae744d60eedd4884f021562d0.tar.xz mdadm-0f23aa88f81127eae744d60eedd4884f021562d0.zip |
config: restore the possibility of a NULL homehost
As homehost defaults to the system name it is not possible to specify
a NULL homehost.
This patch restored this ability with either --homehost="" or
--homehost="<none>".
This allows the creation of v1.x arrays without a "hostname:"
prefix in the name.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -589,9 +589,12 @@ void homehostline(char *line) for (w=dl_next(line); w != line ; w=dl_next(w)) { if (strcasecmp(w, "<ignore>")==0) require_homehost = 0; - else if (home_host == NULL) - home_host = strdup(w); - else + else if (home_host == NULL) { + if (strcasecmp(w, "<none>")==0) + home_host = strdup(""); + else + home_host = strdup(w); + }else fprintf(stderr, Name ": excess host name on HOMEHOST line: %s - ignored\n", w); } |