All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gerards <mgerards@xs4all.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Add host open devicename check
Date: Fri, 09 Nov 2007 22:17:19 +0100	[thread overview]
Message-ID: <87bqa3jezk.fsf@xs4all.nl> (raw)
In-Reply-To: <20071109205638.GB23437@thorin> (Robert Millan's message of "Fri,  9 Nov 2007 21:56:38 +0100")

Robert Millan <rmh@aybabtu.com> writes:

> On Thu, Oct 25, 2007 at 09:51:38PM +0200, Christian Franke wrote:
>>  static grub_err_t
>> -grub_host_open (const char *name __attribute((unused)), grub_disk_t disk)
>> +grub_host_open (const char *name, grub_disk_t disk)
>>  {
>> +  if (grub_strcmp(name, "host"))
>> +      return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a host disk");
>> +
>
> I would test for (disk->id == GRUB_DISK_DEVICE_HOST_ID) instead.  Faster,
> and also cleaner/simpler IMHO.

It's not possible unfortunately :-(.  This information is about to be
filled in in this same function.  Besides that, you have grub_disk_dev
in mind.

--
Marco




  reply	other threads:[~2007-11-09 21:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 19:51 [PATCH] Add host open devicename check Christian Franke
2007-11-09 15:04 ` Marco Gerards
2007-11-10 13:31   ` Christian Franke
2007-11-10 16:04     ` Marco Gerards
2007-11-18  7:17       ` Robert Millan
2007-11-09 20:56 ` Robert Millan
2007-11-09 21:17   ` Marco Gerards [this message]
2007-11-09 21:25     ` Robert Millan
2007-11-10 13:52       ` Christian Franke
2007-11-10 16:05       ` Marco Gerards

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=87bqa3jezk.fsf@xs4all.nl \
    --to=mgerards@xs4all.nl \
    --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.