* 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:
parent
246c23696a
commit
a562b47916
3 changed files with 11 additions and 2 deletions
|
@ -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>
|
2011-04-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Increase LVM implementation robustness in order not to crash on
|
Increase LVM implementation robustness in order not to crash on
|
||||||
|
|
|
@ -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) >=
|
if (grub_le_to_cpu32 (real_sb->dev_number) >=
|
||||||
grub_le_to_cpu32 (real_sb->max_dev))
|
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");
|
"spares aren't implemented");
|
||||||
|
|
||||||
array->index = grub_le_to_cpu16
|
array->index = grub_le_to_cpu16
|
||||||
(real_sb->dev_roles[grub_le_to_cpu32 (real_sb->dev_number)]);
|
(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_len = 16;
|
||||||
array->uuid = grub_malloc (16);
|
array->uuid = grub_malloc (16);
|
||||||
if (!array->uuid)
|
if (!array->uuid)
|
||||||
|
|
|
@ -202,7 +202,7 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
|
||||||
"unsupported RAID level: %d", level);
|
"unsupported RAID level: %d", level);
|
||||||
if (grub_le_to_cpu32 (sb.this_disk.number) == 0xffff
|
if (grub_le_to_cpu32 (sb.this_disk.number) == 0xffff
|
||||||
|| grub_le_to_cpu32 (sb.this_disk.number) == 0xfffe)
|
|| 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");
|
"spares aren't implemented");
|
||||||
|
|
||||||
array->name = NULL;
|
array->name = NULL;
|
||||||
|
|
Loading…
Reference in a new issue