2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
* kern/disk.c (grub_disk_read): When there is a read error, always try to read only the necessary data. * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and disk/raid.c. * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New prototype. [GRUB_UTIL] (grub_raid_fini): Likewise. [GRUB_UTIL] (grub_lvm_init): Likewise. [GRUB_UTIL] (grub_lvm_fini): Likewise. * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is RAID device and copy DEVICE_NAME to DRIVE_NAME in that case. (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini() and grub_raid_fini().
This commit is contained in:
parent
03e58196a8
commit
790707f254
6 changed files with 56 additions and 17 deletions
|
@ -412,11 +412,6 @@ grub_disk_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
|
||||
/* If more data is required, no way. */
|
||||
if (pos + size
|
||||
>= (GRUB_DISK_SECTOR_SIZE << GRUB_DISK_CACHE_BITS))
|
||||
goto finish;
|
||||
|
||||
num = ((size + GRUB_DISK_SECTOR_SIZE - 1)
|
||||
>> GRUB_DISK_SECTOR_BITS);
|
||||
if ((disk->dev->read) (disk, sector, num, tmp_buf))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue