Merge ofwfb into ofwclock
This commit is contained in:
commit
b47c575a58
2 changed files with 4 additions and 18 deletions
|
@ -68,7 +68,6 @@ grub_children_iterate (char *devpath,
|
||||||
{
|
{
|
||||||
struct grub_ieee1275_devalias alias;
|
struct grub_ieee1275_devalias alias;
|
||||||
grub_ssize_t actual;
|
grub_ssize_t actual;
|
||||||
char *fullname;
|
|
||||||
|
|
||||||
if (grub_ieee1275_get_property (child, "device_type", childtype,
|
if (grub_ieee1275_get_property (child, "device_type", childtype,
|
||||||
IEEE1275_MAX_PROP_LEN, &actual))
|
IEEE1275_MAX_PROP_LEN, &actual))
|
||||||
|
@ -82,23 +81,10 @@ grub_children_iterate (char *devpath,
|
||||||
IEEE1275_MAX_PROP_LEN, &actual))
|
IEEE1275_MAX_PROP_LEN, &actual))
|
||||||
continue;
|
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.type = childtype;
|
||||||
alias.path = childpath;
|
alias.path = childpath;
|
||||||
alias.name = fullname;
|
alias.name = childname;
|
||||||
ret = hook (&alias);
|
ret = hook (&alias);
|
||||||
grub_free (fullname);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +105,7 @@ grub_ieee1275_devices_iterate (int (*hook) (struct grub_ieee1275_devalias *alias
|
||||||
{
|
{
|
||||||
if (hook (alias))
|
if (hook (alias))
|
||||||
return 1;
|
return 1;
|
||||||
return grub_children_iterate (alias->name, it_through);
|
return grub_children_iterate (alias->path, it_through);
|
||||||
}
|
}
|
||||||
|
|
||||||
return grub_children_iterate ("/", it_through);
|
return grub_children_iterate ("/", it_through);
|
||||||
|
|
|
@ -59,8 +59,8 @@ find_display (void)
|
||||||
{
|
{
|
||||||
if (grub_strcmp (alias->type, "display") == 0)
|
if (grub_strcmp (alias->type, "display") == 0)
|
||||||
{
|
{
|
||||||
grub_dprintf ("video", "Found display %s\n", alias->name);
|
grub_dprintf ("video", "Found display %s\n", alias->path);
|
||||||
display = grub_strdup (alias->name);
|
display = grub_strdup (alias->path);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue