summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2012-10-20 13:40:02 +0200
committerNeilBrown <neilb@suse.de>2012-10-21 23:48:18 +0200
commit30d48159710996be7770bfbfbddc826317b561aa (patch)
treebce4d191a36ac789bb163f429a2333c69e726b17 /super0.c
parentAssemble: split out force_array() (diff)
downloadmdadm-30d48159710996be7770bfbfbddc826317b561aa.tar.xz
mdadm-30d48159710996be7770bfbfbddc826317b561aa.zip
mdadm: super0: do not override uuid with homehost
When --uuid is specified in the command line, even for v0.90 superblock we override last portion of uuid with data from --homehost, which is wrong (and disagrees with the manpage). Only use homehost in super0 if no uuid is specified. Signed-off-By: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super0.c b/super0.c
index ac56d05c..a748967e 100644
--- a/super0.c
+++ b/super0.c
@@ -662,7 +662,7 @@ static int init_super0(struct supertype *st, mdu_array_info_t *info,
if (rfd >= 0)
close(rfd);
}
- if (homehost) {
+ if (homehost && !uuid) {
char buf[20];
char *hash = sha1_buffer(homehost,
strlen(homehost),