]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
authordavem <davem@localhost>
Thu, 30 Apr 2009 13:17:10 +0000 (13:17 +0000)
committerdavem <davem@localhost>
Thu, 30 Apr 2009 13:17:10 +0000 (13:17 +0000)
lettered partition specifier is found, convert to numbered.

ChangeLog
kern/sparc64/ieee1275/init.c

index 84a61e0fc285bf01805b051e4d02ef793333b4d0..4b170990efb80548d0232c278405316fcc154d31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-30  David S. Miller  <davem@davemloft.net>
+
+       * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
+       lettered partition specifier is found, convert to numbered.
+
 2009-04-29  David S. Miller  <davem@davemloft.net>
 
        * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
index 5114f7694da2aba3ac07feee7fb121b85d50b3c7..699f9631b7884503e21c8be28b371dc6211b82ec 100644 (file)
@@ -64,8 +64,8 @@ grub_machine_set_prefix (void)
   if (grub_prefix[0] != '(')
     {
       char bootpath[IEEE1275_MAX_PATH_LEN];
+      char *prefix, *path, *colon;
       grub_ssize_t actual;
-      char *prefix, *path;
 
       if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath",
                                      &bootpath, sizeof (bootpath), &actual))
@@ -77,6 +77,17 @@ grub_machine_set_prefix (void)
        }
 
       /* Transform an OF device path to a GRUB path.  */
+      colon = grub_strchr (bootpath, ':');
+      if (colon)
+       {
+         char *part = colon + 1;
+
+         /* Consistently provide numbered partitions to GRUB.
+            OpenBOOT traditionally uses alphabetical partition
+            specifiers.  */
+         if (part[0] >= 'a' && part[0] <= 'z')
+           part[0] = '1' + (part[0] - 'a');
+       }
       prefix = grub_ieee1275_encode_devname (bootpath);
 
       path = grub_malloc (grub_strlen (grub_prefix)