Create: don't wait for device to appear if we didn't actually start the array

Otherwise we get an unpleasant 2 second pause when array creation
fails.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2008-11-07 22:20:56 +11:00
parent 4408ee768b
commit 01cbfcc854
1 changed files with 1 additions and 1 deletions

View File

@ -780,11 +780,11 @@ int Create(struct supertype *st, char *mddev,
ping_monitor(devnum2devname(st->container_dev));
close(container_fd);
}
wait_for(chosen_name);
} else {
fprintf(stderr, Name ": not starting array - not enough devices.\n");
}
close(mdfd);
wait_for(chosen_name);
return 0;
abort: