From 3713633a30349773a83bd8257cdd64b86ce32dbd Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sat, 20 Oct 2012 15:40:02 +0400 Subject: 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 --- super0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/super0.c b/super0.c index 1375799..ca4c082 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), -- cgit v1.2.1