mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Don't try to
retrieve the metadat sector if size isn't known. * grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
This commit is contained in:
1 parent
9dfe92d07a
commit
7b61e6096b
3 files changed
+11
No files matched your search
@@ -123,6 +123,9 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
|
||||
|
||||
for (minor_version = 0; minor_version < 3; ++minor_version)
|
||||
{
|
||||
if (size == GRUB_DISK_SIZE_UNKNOWN && minor_version == 0)
|
||||
continue;
|
||||
|
||||
switch (minor_version)
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -170,6 +170,8 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
|
||||
|
||||
/* The sector where the mdraid 0.90 superblock is stored, if available. */
|
||||
size = grub_disk_get_size (disk);
|
||||
if (size == GRUB_DISK_SIZE_UNKNOWN)
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "not 0.9x raid");
|
||||
sector = NEW_SIZE_SECTORS (size);
|
||||
|
||||
if (grub_disk_read (disk, sector, 0, SB_BYTES, &sb))
|
||||
|
||||
Reference in new issue
Block a user