diff options
author | NeilBrown <neilb@suse.de> | 2010-03-03 14:33:55 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-03-03 14:33:55 +1100 |
commit | d1d3482b562369b0d32e4267c2e245a3371d1f10 (patch) | |
tree | 72c0394196b102c9ec5782d5fdb80ba387ae43e7 /super-ddf.c | |
parent | 5a9de8db047646e1e59d90afc478d1820736324d (diff) |
config: add 'homehost' option to 'AUTO' line.
This allows basing auto-assembly decisions on whether
the array is recorded as belonging to this host or not.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-ddf.c')
-rw-r--r-- | super-ddf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/super-ddf.c b/super-ddf.c index 870efd82..c2c562f1 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1260,7 +1260,11 @@ static int match_home_ddf(struct supertype *st, char *homehost) * the hostname */ struct ddf_super *ddf = st->sb; - int len = strlen(homehost); + int len; + + if (!homehost) + return 0; + len = strlen(homehost); return (memcmp(ddf->controller.guid, T10, 8) == 0 && len < sizeof(ddf->controller.vendor_data) && |