[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] biosdisk / open_device() messing up offsets
From: |
Bean |
Subject: |
Re: [PATCH] biosdisk / open_device() messing up offsets |
Date: |
Sun, 8 Jun 2008 14:44:00 +0800 |
On Sun, Jun 8, 2008 at 2:00 PM, Pavel Roskin <address@hidden> wrote:
> 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.
The reason I add device support for hexdump is to debug the nand
driver. I need to go around the disk cache and call the underlying
disk driver directly, so I use disk->dev->read. For (nand), there is
just one partition, so I didn't notice the problem then.
--
Bean
- Re: [PATCH] biosdisk / open_device() messing up offsets, (continued)
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/04
- Re: [PATCH] biosdisk / open_device() messing up offsets, Robert Millan, 2008/06/06
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/06
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/07
- Re: [PATCH] biosdisk / open_device() messing up offsets, Bean, 2008/06/07
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets,
Bean <=
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets, Bean, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets, Bean, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets, Bean, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/08
- Re: [PATCH] biosdisk / open_device() messing up offsets, Bean, 2008/06/09
- Re: [PATCH] biosdisk / open_device() messing up offsets, Bean, 2008/06/10
- Re: [PATCH] biosdisk / open_device() messing up offsets, Pavel Roskin, 2008/06/10