2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
avoid double grub_adjust_range call. Bug reported by David Simner * kern/disk.c (grub_disk_write): change to raw disk access before calling disk_read
This commit is contained in:
parent
1bd265f306
commit
74aa8e4bf8
2 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
avoid double grub_adjust_range call. Bug reported by David Simner
|
||||
|
||||
* kern/disk.c (grub_disk_write): change to raw disk access before
|
||||
calling disk_read
|
||||
|
||||
2009-06-17 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* util/elf/grub-mkimage.c (usage): Prefix each option line with two
|
||||
|
|
|
@ -542,10 +542,17 @@ grub_disk_write (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
{
|
||||
char tmp_buf[GRUB_DISK_SECTOR_SIZE];
|
||||
grub_size_t len;
|
||||
grub_partition_t part;
|
||||
|
||||
part = disk->partition;
|
||||
disk->partition = 0;
|
||||
if (grub_disk_read (disk, sector, 0, GRUB_DISK_SECTOR_SIZE, tmp_buf)
|
||||
!= GRUB_ERR_NONE)
|
||||
goto finish;
|
||||
{
|
||||
disk->partition = part;
|
||||
goto finish;
|
||||
}
|
||||
disk->partition = part;
|
||||
|
||||
len = GRUB_DISK_SECTOR_SIZE - real_offset;
|
||||
if (len > size)
|
||||
|
|
Loading…
Reference in a new issue