* 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:
parent
75b49ebed9
commit
4d1e2bc9e3
3 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Remove defines pertaining to arbitrary limits not affecting GRUB
|
Remove defines pertaining to arbitrary limits not affecting GRUB
|
||||||
|
|
|
@ -100,8 +100,10 @@ grub_dmraid_nv_detect (grub_disk_t disk, struct grub_raid_array *array,
|
||||||
if (disk->partition)
|
if (disk->partition)
|
||||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "skip 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))
|
if (grub_disk_read (disk, sector, 0, sizeof (sb), &sb))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
|
|
|
@ -131,8 +131,7 @@ scan_devices (const char *arname)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((disk->total_sectors != GRUB_ULONG_MAX) &&
|
if ((! raid->detect (disk, &array, &start_sector)) &&
|
||||||
(! raid->detect (disk, &array, &start_sector)) &&
|
|
||||||
(! insert_array (disk, &array, start_sector, raid->name,
|
(! insert_array (disk, &array, start_sector, raid->name,
|
||||||
raid)))
|
raid)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue