Revert gratuituos change of alias.name
This commit is contained in:
parent
a1cb3e3811
commit
a3334e79e8
2 changed files with 4 additions and 18 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue