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>
This commit is contained in:
Michael Tokarev 2012-10-20 15:40:02 +04:00 committed by NeilBrown
parent 9f5470ce8d
commit 30d4815971
1 changed files with 1 additions and 1 deletions

View File

@ -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),