From: Christian Franke <Christian.Franke@t-online.de>
To: grub-devel@gnu.org
Subject: [PATCH] Add host open devicename check
Date: Thu, 25 Oct 2007 21:51:38 +0200 [thread overview]
Message-ID: <4720F3CA.7070804@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 344 bytes --]
grub-emu ls command does not list any partitions.
Device scan in grub_disk_open() stops early because grub_host_open()
returns success on all device names.
Christian
2007-10-25 Christian Franke <franke@computer.org>
* disk/host.c (grub_host_open): Add check for "host". This fixes
the problem that grub-emu does not find partitions.
[-- Attachment #2: grub2-host_open.patch --]
[-- Type: text/x-patch, Size: 503 bytes --]
--- grub2.orig/disk/host.c 2007-08-02 19:24:05.000000000 +0200
+++ grub2/disk/host.c 2007-10-13 15:11:18.000000000 +0200
@@ -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";
next reply other threads:[~2007-10-25 19:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 19:51 Christian Franke [this message]
2007-11-09 15:04 ` [PATCH] Add host open devicename check 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
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=4720F3CA.7070804@t-online.de \
--to=christian.franke@t-online.de \
--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.