mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
Fix a cache retrieving bug
This commit is contained in:
1 parent
d8a2bcf564
commit
0c512b092c
1 file changed
+2
-1
@@ -571,7 +571,8 @@ grub_disk_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
grub_memcpy (buf, data, GRUB_DISK_CACHE_SIZE);
|
grub_memcpy (buf, data,
|
||||||
|
GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
||||||
sector += GRUB_DISK_CACHE_SIZE;
|
sector += GRUB_DISK_CACHE_SIZE;
|
||||||
buf = (char *) buf + (GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
buf = (char *) buf + (GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
||||||
size -= (GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
size -= (GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
||||||
|
|||||||
Reference in new issue
Block a user