]> git.proxmox.com Git - grub2.git/commitdiff
2004-11-16 Marco Gerards <metgerards@student.han.nl>
authormarco_g <marco_g@localhost>
Tue, 16 Nov 2004 21:59:11 +0000 (21:59 +0000)
committermarco_g <marco_g@localhost>
Tue, 16 Nov 2004 21:59:11 +0000 (21:59 +0000)
* 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.

ChangeLog
kern/powerpc/ieee1275/openfw.c

index 08a2468cb9bf955744716e8b58912e29d0ca149f..692ebb2da07839bbc5dbdf1821d466383b801c1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index c60685230cb70aa066dd51bf7a9726823a53580e..275258c3118e1dd4ee5e12c5f0c4cb122c056d06 100644 (file)
@@ -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;