merge mainline into hints

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-12-23 18:46:06 +01:00
parent edddb7f9b2
commit ca74c50c0b

View file

@ -198,8 +198,14 @@ grub_ofdisk_iterate (int (*hook) (const char *name),
if (grub_strncmp (ent->shortest, "cdrom", 5) == 0)
continue;
if (hook (ent->shortest))
return 1;
{
char buffer[sizeof ("ieee1275/") + grub_strlen (env->shortest)];
char *ptr;
ptr = grub_stpcpy (buffer, "ieee1275/");
grub_strcpy (ptr, env->shortest);
if (hook (buffer))
return 1;
}
}
}
return 0;
@ -241,7 +247,10 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
char prop[64];
grub_ssize_t actual;
devpath = compute_dev_path (name);
if (grub_strncmp (devpath, "ieee1275/", sizeof ("ieee1275/") - 1) != 0)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
"not IEEE1275 device");
devpath = compute_dev_path (name + sizeof ("ieee1275/") - 1);
if (! devpath)
return grub_errno;