[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OF device names and util/biosdisk.c
From: |
Pavel Roskin |
Subject: |
Re: OF device names and util/biosdisk.c |
Date: |
Thu, 31 Jan 2008 22:49:32 -0500 |
On Thu, 2008-01-31 at 22:57 +0100, Jordi Mallach wrote:
> address@hidden:~$ sudo grub-mkdevicemap --device-map=/dev/stdout
> (hd) /dev/hda
>
> However, grub-probe totally doesn't like the lack of drive number:
> address@hidden:~$ sudo grub-probe /boot/grub
> grub-probe: error: /boot/grub/device.map:1: Bad device name
>
> If I edit my device.map and add a drive number, say hd0:
>
> address@hidden:~$ sudo grub-probe /boot/grub
> hfs
Yes, I've seen this problem.
> util/biosdisk.c assumes:
>
> if (drive < 0 || drive >= (int) (sizeof (map) / sizeof (map[0])))
> show_error ("Bad device name");
>
> Can this be ifndef GRUB_MACHINE_PCBIOS'd?
No. This would lead to using a wrong index in the map table. I think
the code should be changed so that the map uses consecutive numbers for
the entries in device.map and stores the actual names.
The BIOS numbers for the disks should not be needed in cross-platform
utilities. If they are, the code should be fixed.
--
Regards,
Pavel Roskin