* OF device names and util/biosdisk.c
@ 2008-01-31 21:57 Jordi Mallach
2008-02-01 3:49 ` Pavel Roskin
0 siblings, 1 reply; 2+ messages in thread
From: Jordi Mallach @ 2008-01-31 21:57 UTC (permalink / raw)
To: grub-devel
jordi@horta:~$ sudo grub-mkdevicemap --device-map=/dev/stdout
(hd) /dev/hda
However, grub-probe totally doesn't like the lack of drive number:
jordi@horta:~$ 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:
jordi@horta:~$ sudo grub-probe /boot/grub
hfs
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?
Jordi
--
Jordi Mallach Pérez -- Debian developer http://www.debian.org/
jordi@sindominio.net jordi@debian.org http://www.sindominio.net/
GnuPG public key information available at http://oskuro.net/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: OF device names and util/biosdisk.c
2008-01-31 21:57 OF device names and util/biosdisk.c Jordi Mallach
@ 2008-02-01 3:49 ` Pavel Roskin
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Roskin @ 2008-02-01 3:49 UTC (permalink / raw)
To: The development of GRUB 2
On Thu, 2008-01-31 at 22:57 +0100, Jordi Mallach wrote:
> jordi@horta:~$ sudo grub-mkdevicemap --device-map=/dev/stdout
> (hd) /dev/hda
>
> However, grub-probe totally doesn't like the lack of drive number:
> jordi@horta:~$ 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:
>
> jordi@horta:~$ 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-01 3:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31 21:57 OF device names and util/biosdisk.c Jordi Mallach
2008-02-01 3:49 ` Pavel Roskin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.