|
From: | Christian Franke |
Subject: | Re: [PATCH] Add host open devicename check |
Date: | Sat, 10 Nov 2007 14:31:37 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 |
Marco Gerards wrote:
.. 2007-10-25 Christian Franke <address@hidden> * disk/host.c (grub_host_open): Add check for "host". This fixes the problem that grub-emu does not find partitions.Please mention the attribute change.... 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");Please add a space after the function name and before the "(".
Done Christian 2007-11-10 Christian Franke <address@hidden> * disk/host.c (grub_host_open): Remove attribute unused from name parameter. Add check for "host". This fixes the problem that grub-emu does not find partitions.
--- grub2.orig/disk/host.c 2007-08-02 19:24:05.000000000 +0200 +++ grub2/disk/host.c 2007-11-10 14:18:11.046875000 +0100 @@ -34,8 +34,11 @@ grub_host_iterate (int (*hook) (const ch } 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"); + disk->total_sectors = 0; disk->id = (int) "host";
[Prev in Thread] | Current Thread | [Next in Thread] |