* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Remove useless

grub_errors.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Simplify by
	not reloading whole superblock but only the part which is really needed.
	Remove useless grub_errors.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Remove useless
	grub_errors.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-26 23:36:12 +01:00
parent e2a833958e
commit b2582b84f2
4 changed files with 79 additions and 114 deletions

View file

@ -103,26 +103,20 @@ grub_dmraid_nv_detect (grub_disk_t disk,
char *uuid;
if (disk->partition)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "skip partition");
return NULL;
}
/* Skip partition. */
return NULL;
sector = grub_disk_get_size (disk);
if (sector == GRUB_DISK_SIZE_UNKNOWN)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "not raid");
return NULL;
}
/* Not raid. */
return NULL;
sector -= 2;
if (grub_disk_read (disk, sector, 0, sizeof (sb), &sb))
return NULL;
if (grub_memcmp (sb.vendor, NV_ID_STRING, 6))
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "not raid");
return NULL;
}
/* Not raid. */
return NULL;
if (sb.version != NV_VERSION)
{