From 9197b0ade5b9e1a923122ab8aa51a941ee3bd15b Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 24 Dec 2011 02:40:18 +0100 Subject: [PATCH] * 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. --- ChangeLog | 8 ++++++++ grub-core/disk/ieee1275/ofdisk.c | 6 +++--- grub-core/kern/ieee1275/openfw.c | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a409fabc..8c4a5b468 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-12-24 Vladimir Serbinenko + + * 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 * docs/grub.texi (Filesystems): Update. diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c index b4a8d969c..0cbeab802 100644 --- a/grub-core/disk/ieee1275/ofdisk.c +++ b/grub-core/disk/ieee1275/ofdisk.c @@ -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); diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c index ee81b4ef9..a063cfe63 100644 --- a/grub-core/kern/ieee1275/openfw.c +++ b/grub-core/kern/ieee1275/openfw.c @@ -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);