Fix bug with ddf if devices have different sizes.

We cannot use the header of the 'best' device to find the
sections on the other devices!!


Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2008-08-19 17:55:15 +10:00
parent 2cc2983d80
commit 567df5fd0a
1 changed files with 1 additions and 0 deletions

View File

@ -2533,6 +2533,7 @@ static int load_super_ddf_all(struct supertype *st, int fd,
dfd = dev_open(nm, keep_fd? O_RDWR : O_RDONLY);
if (dfd < 0)
return 2;
load_ddf_headers(dfd, super, NULL);
seq = load_ddf_local(dfd, super, NULL, keep_fd);
if (!keep_fd) close(dfd);
}