2004-11-16 Marco Gerards <metgerards@student.han.nl>
* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any property named `name'. Correctly handle the error returned by `grub_ieee1275_finddevice' if a device can not be opened.
This commit is contained in:
parent
a2fea4276a
commit
19950e29d7
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-11-16 Marco Gerards <metgerards@student.han.nl>
|
||||
|
||||
* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
|
||||
property named `name'. Correctly handle the error returned by
|
||||
`grub_ieee1275_finddevice' if a device can not be opened.
|
||||
|
||||
2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
|
||||
|
||||
* term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
|
||||
|
|
|
@ -103,6 +103,11 @@ grub_devalias_iterate (int (*hook) (struct grub_ieee1275_devalias *alias))
|
|||
char devtype[64];
|
||||
|
||||
grub_ieee1275_get_property_length (devalias, aliasname, &pathlen);
|
||||
|
||||
/* The property `name' is a special case we should skip. */
|
||||
if (!grub_strcmp (aliasname, "name"))
|
||||
continue;
|
||||
|
||||
devpath = grub_malloc (pathlen);
|
||||
if (! devpath)
|
||||
return grub_errno;
|
||||
|
@ -113,8 +118,8 @@ grub_devalias_iterate (int (*hook) (struct grub_ieee1275_devalias *alias))
|
|||
grub_free (devpath);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (grub_ieee1275_finddevice (devpath, &dev))
|
||||
|
||||
if (grub_ieee1275_finddevice (devpath, &dev) || dev == -1)
|
||||
{
|
||||
grub_free (devpath);
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue