Don't set was_readable for new array

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-04-24 02:39:21 +02:00
parent 716aa45e40
commit b094f07c23

View file

@ -637,6 +637,7 @@ insert_array (grub_disk_t disk, struct grub_raid_array *new_array,
grub_raid_t raid __attribute__ ((unused)))
{
struct grub_raid_array *array = 0, *p;
int was_readable = 0;
/* See whether the device is part of an array we have already seen a
device from. */
@ -647,6 +648,8 @@ insert_array (grub_disk_t disk, struct grub_raid_array *new_array,
grub_free (new_array->uuid);
array = p;
was_readable = grub_is_array_readable (array);
/* Do some checks before adding the device to the array. */
if (new_array->index >= array->allocated_devs)
@ -803,15 +806,11 @@ insert_array (grub_disk_t disk, struct grub_raid_array *new_array,
}
/* Add the device to the array. */
{
int was_readable = grub_is_array_readable (array);
array->members[new_array->index].device = disk;
array->members[new_array->index].start_sector = start_sector;
array->nr_devs++;
if (!was_readable && grub_is_array_readable (array))
array->became_readable_at = inscnt++;
}
array->members[new_array->index].device = disk;
array->members[new_array->index].start_sector = start_sector;
array->nr_devs++;
if (!was_readable && grub_is_array_readable (array))
array->became_readable_at = inscnt++;
return 0;
}