On Sat, 2008-06-07 at 15:48 +0800, Bean wrote:

> I believe the problem is with hexdump. It open the device with
> grub_disk_open, which returns the disk object related to the beginning
> of partition. However, it read it using disk->dev->read, which is a
> low level api that use absolute address. It should be using
> grub_disk_read instead.

Nice catch!  Indeed, hexdump has special handling for the whole
partitions.  And it actually tries to satisfy the low level API by
converting offset to the sector number and skipping the remainder.  I
guess it could be simplified if grub_disk_read() is used.

> BTW, I also find an ingesting situation when writing the load_env
> command. The read hook return absolute address, so grub_disk_read
> would not work. In that case, we have to use the low level
> disk->dev->read.

In that case it may be justified.

-- 
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to