* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Detect spares

and report them as not RAID members since they are useless for GRUB.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-04-06 12:29:49 +02:00
parent 246c23696a
commit a562b47916
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2011-04-06 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Detect spares
and report them as not RAID members since they are useless for GRUB.
* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
2011-04-02 Vladimir Serbinenko <phcoder@gmail.com>
Increase LVM implementation robustness in order not to crash on

View file

@ -200,11 +200,14 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
if (grub_le_to_cpu32 (real_sb->dev_number) >=
grub_le_to_cpu32 (real_sb->max_dev))
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"spares aren't implemented");
array->index = grub_le_to_cpu16
(real_sb->dev_roles[grub_le_to_cpu32 (real_sb->dev_number)]);
if (array->index >= array->total_devs)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"spares aren't implemented");
array->uuid_len = 16;
array->uuid = grub_malloc (16);
if (!array->uuid)

View file

@ -202,7 +202,7 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
"unsupported RAID level: %d", level);
if (grub_le_to_cpu32 (sb.this_disk.number) == 0xffff
|| grub_le_to_cpu32 (sb.this_disk.number) == 0xfffe)
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"spares aren't implemented");
array->name = NULL;