From 838acbc2724c57f9dc1facec201d20f09a81d375 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 27 Jan 2006 01:44:47 +0000 Subject: Assorted fixes... Signed-off-by: Neil Brown --- Assemble.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Assemble.c') diff --git a/Assemble.c b/Assemble.c index 0555854..cc906db 100644 --- a/Assemble.c +++ b/Assemble.c @@ -219,7 +219,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, } if (dfd >= 0) close(dfd); - if (ident->uuid_set && (!update && strcmp(update, "uuid")!= 0) && + if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) && (!super || same_uuid(info.uuid, ident->uuid, tst->ss->swapuuid)==0)) { if ((inargv && verbose >= 0) || verbose > 0) fprintf(stderr, Name ": %s has wrong uuid.\n", @@ -266,6 +266,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, free(first_super); return 1; } + + st = tst; /* commit to this format, if haven't already */ if (st->ss->compare_super(&first_super, super)) { fprintf(stderr, Name ": superblock on %s doesn't match others - assembly aborted\n", -- cgit