grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add host open devicename check


From: Marco Gerards
Subject: Re: [PATCH] Add host open devicename check
Date: Fri, 09 Nov 2007 22:17:19 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Robert Millan <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]