2008-06-06 Robert Millan <rmh@aybabtu.com>

* util/biosdisk.c (open_device): Do not modify sector offset when
        accessing a partition.  kern/disk.c already handles this for us.
This commit is contained in:
robertmh 2008-06-06 15:56:46 +00:00
parent 25d6b3273b
commit 26a1f8c455
2 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2008-06-06 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (open_device): Do not modify sector offset when
accessing a partition. kern/disk.c already handles this for us.
2008-06-06 Robert Millan <rmh@aybabtu.com> 2008-06-06 Robert Millan <rmh@aybabtu.com>
* util/grub-emu.c (grub_machine_init): Move code in this function from * util/grub-emu.c (grub_machine_init): Move code in this function from

View file

@ -298,9 +298,6 @@ open_device (const grub_disk_t disk, grub_disk_addr_t sector, int flags)
/* Make the buffer cache consistent with the physical disk. */ /* Make the buffer cache consistent with the physical disk. */
ioctl (fd, BLKFLSBUF, 0); ioctl (fd, BLKFLSBUF, 0);
if (is_partition)
sector -= disk->partition->start;
} }
#else /* ! __linux__ */ #else /* ! __linux__ */
fd = open (map[disk->id].device, flags); fd = open (map[disk->id].device, flags);