* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_devalias_next): Make

source and destination differ.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-04-15 00:40:19 +02:00
parent 21aecce0f9
commit cbe57a487b
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-04-15 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_devalias_next): Make
source and destination differ.
2013-04-15 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/ieee1275/ofdisk.c: Fix CD-ROM and boot device

View file

@ -193,18 +193,22 @@ grub_ieee1275_devalias_next (struct grub_ieee1275_devalias *alias)
{
grub_ssize_t pathlen;
grub_ssize_t actual;
char *tmp;
if (alias->path)
{
grub_free (alias->path);
alias->path = 0;
}
if (grub_ieee1275_next_property (alias->parent_dev, alias->name,
tmp = grub_strdup (alias->name);
if (grub_ieee1275_next_property (alias->parent_dev, tmp,
alias->name) <= 0)
{
grub_free (tmp);
grub_ieee1275_devalias_free (alias);
return 0;
}
grub_free (tmp);
grub_dprintf ("devalias", "devalias name = %s\n", alias->name);