[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH,HURD] Fix grub-probe with userland partition support
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH,HURD] Fix grub-probe with userland partition support |
Date: |
Mon, 23 Apr 2012 10:52:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
On 22.04.2012 20:24, Samuel Thibault wrote:
> Hello,
>
> GNU/Hurd is moving to userland partition support, i.e. /dev/hd0s* slices
> are actually served by userland translators which use libparted. The
> grub probe code needs to be fixed for that, here is a proposed patch.
>
> The principle is that it gets the store translator behind the file being
> probed for, and compares the storage area there with what grub detects
> itself. That is why it makes use of the map array, which I preferred
> to rename to hostdisk_map (thus big but trivial changes in hostdisk.c):
> even if it was already an external symbol, it's preferrable to prefix
> it.
map was never intended to be globally visible. At most perhaps
"semi-local" due to difficulties of split between getroot.c and hostdisk.c
Moreover the behaviour of find_root_device must be independent of what
is already in map since we don't rely anymore at map being populated at
all and at entries only on as-needed basis.
Additional problems include:
+ if (disk->dev->id != GRUB_DISK_DEVICE_BIOSDISK_ID && disk->dev->id !=
GRUB_DISK_DEVICE_HOSTDISK_ID)
+ {
No need to check for BIOSDISK. It's not used for hostdisk.
+ store_offset_t start = partition->start * GRUB_DISK_SECTOR_SIZE,
+ length = partition->len * GRUB_DISK_SECTOR_SIZE,
This is both stylistically incorrect and wrong.
Stylistically at declaration we repeat type on every line.
Additionally partition->start is only relative to container, not whole disk.
You have to use grub_disk_partition_get_start for this.
>
> Samuel
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature
- [PATCH,HURD] Fix grub-probe with userland partition support, Samuel Thibault, 2012/04/22
- Re: [PATCH,HURD] Fix grub-probe with userland partition support,
Vladimir 'φ-coder/phcoder' Serbinenko <=
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Samuel Thibault, 2012/04/23
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/04/23
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Samuel Thibault, 2012/04/23
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/04/23
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Samuel Thibault, 2012/04/23
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Samuel Thibault, 2012/04/23
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/04/24
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Samuel Thibault, 2012/04/24
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Vladimir 'φ-coder/phcoder' Serbinenko, 2012/04/24
- Re: [PATCH,HURD] Fix grub-probe with userland partition support, Samuel Thibault, 2012/04/24