From: Michael Tokarev Date: Sat, 20 Oct 2012 11:40:02 +0000 (+0400) Subject: mdadm: super0: do not override uuid with homehost X-Git-Tag: mdadm-3.2.6~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3713633a30349773a83bd8257cdd64b86ce32dbd;p=thirdparty%2Fmdadm.git 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 Signed-off-by: NeilBrown --- diff --git a/super0.c b/super0.c index 13757998..ca4c0820 100644 --- a/super0.c +++ b/super0.c @@ -657,7 +657,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),