* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Add ieee1275/

prefix.
	(grub_ofdisk_open): Check and discard ieee1275 prefix.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
	Add ieee1275 prefix.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-12-24 02:40:18 +01:00
parent ca74c50c0b
commit 9197b0ade5
3 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2011-12-24 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Add ieee1275/
prefix.
(grub_ofdisk_open): Check and discard ieee1275 prefix.
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Add ieee1275 prefix.
2011-12-23 Vladimir Serbinenko <phcoder@gmail.com>
* docs/grub.texi (Filesystems): Update.

View File

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

View File

@ -446,7 +446,7 @@ grub_ieee1275_encode_devname (const char *path)
/* GRUB partition 1 is OF partition 0. */
partno++;
encoding = grub_xasprintf ("%s,%d", device, partno);
encoding = grub_xasprintf ("ieee1275/%s,%d", device, partno);
}
else
encoding = grub_strdup (device);