diff --git a/ChangeLog b/ChangeLog index 08a2468cb..692ebb2da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-16 Marco Gerards + + * 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 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test diff --git a/kern/powerpc/ieee1275/openfw.c b/kern/powerpc/ieee1275/openfw.c index c60685230..275258c31 100644 --- a/kern/powerpc/ieee1275/openfw.c +++ b/kern/powerpc/ieee1275/openfw.c @@ -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;