mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip
disks with unknown size. * grub-core/disk/raid.c (scan_devices): Allow disks with unknown sizes.
This commit is contained in:
1 parent
75b49ebed9
commit
4d1e2bc9e3
3 files changed
+11
-4
No files matched your search
@@ -100,8 +100,10 @@ grub_dmraid_nv_detect (grub_disk_t disk, struct grub_raid_array *array,
|
||||
if (disk->partition)
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "skip partition");
|
||||
|
||||
sector = grub_disk_get_size (disk) - 2;
|
||||
|
||||
sector = grub_disk_get_size (disk);
|
||||
if (sector == GRUB_DISK_SIZE_UNKNOWN)
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "not raid");
|
||||
sector -= 2;
|
||||
if (grub_disk_read (disk, sector, 0, sizeof (sb), &sb))
|
||||
return grub_errno;
|
||||
|
||||
|
||||
@@ -131,8 +131,7 @@ scan_devices (const char *arname)
|
||||
}
|
||||
}
|
||||
|
||||
if ((disk->total_sectors != GRUB_ULONG_MAX) &&
|
||||
(! raid->detect (disk, &array, &start_sector)) &&
|
||||
if ((! raid->detect (disk, &array, &start_sector)) &&
|
||||
(! insert_array (disk, &array, start_sector, raid->name,
|
||||
raid)))
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user