]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Revert gratuituos change of alias.name
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 14 Feb 2010 19:03:19 +0000 (20:03 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 14 Feb 2010 19:03:19 +0000 (20:03 +0100)
kern/ieee1275/openfw.c
video/ieee1275.c

index 92ab2f683aa57c6027ae1da5f2469e3f9dc57c91..ee8520359fc8ab6d4f80eaee5efc06aba4f50a63 100644 (file)
@@ -68,7 +68,6 @@ grub_children_iterate (char *devpath,
     {
       struct grub_ieee1275_devalias alias;
       grub_ssize_t actual;
-      char *fullname;
 
       if (grub_ieee1275_get_property (child, "device_type", childtype,
                                      IEEE1275_MAX_PROP_LEN, &actual))
@@ -82,23 +81,10 @@ grub_children_iterate (char *devpath,
                                      IEEE1275_MAX_PROP_LEN, &actual))
        continue;
 
-      if (devpath[0] == '/' && devpath[1] == 0)
-       fullname = grub_xasprintf ("/%s", childname);
-      else
-       fullname = grub_xasprintf ("%s/%s", devpath, childname);
-      if (!fullname)
-       {
-         grub_free (childname);
-         grub_free (childpath);
-         grub_free (childtype);
-         return 0;
-       }
-
       alias.type = childtype;
       alias.path = childpath;
-      alias.name = fullname;
+      alias.name = childname;
       ret = hook (&alias);
-      grub_free (fullname);
       if (ret)
        break;
     }
@@ -119,7 +105,7 @@ grub_ieee1275_devices_iterate (int (*hook) (struct grub_ieee1275_devalias *alias
   {
     if (hook (alias))
       return 1;
-    return grub_children_iterate (alias->name, it_through);
+    return grub_children_iterate (alias->path, it_through);
   }
 
   return grub_children_iterate ("/", it_through);
index 21b65bd32dfced47f1bc0e8cf1790e67936974e4..3f0b93fb86f53f97ce2d2c16e31c9c0c1ddc5f64 100644 (file)
@@ -59,8 +59,8 @@ find_display (void)
   {
     if (grub_strcmp (alias->type, "display") == 0)
       {
-       grub_dprintf ("video", "Found display %s\n", alias->name);
-       display = grub_strdup (alias->name);
+       grub_dprintf ("video", "Found display %s\n", alias->path);
+       display = grub_strdup (alias->path);
        return 1;
       }
     return 0;