All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: OF device names and util/biosdisk.c
Date: Thu, 31 Jan 2008 22:49:32 -0500	[thread overview]
Message-ID: <1201837772.18433.34.camel@dv> (raw)
In-Reply-To: <20080131215712.GA16531@nubol.oskuro.net>

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



      reply	other threads:[~2008-02-01  3:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 21:57 OF device names and util/biosdisk.c Jordi Mallach
2008-02-01  3:49 ` Pavel Roskin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1201837772.18433.34.camel@dv \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.