commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[2152] * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If


From: David S. Miller
Subject: [2152] * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
Date: Thu, 30 Apr 2009 13:17:11 +0000

Revision: 2152
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2152
Author:   davem
Date:     2009-04-30 13:17:10 +0000 (Thu, 30 Apr 2009)
Log Message:
-----------
        * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
        lettered partition specifier is found, convert to numbered.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/kern/sparc64/ieee1275/init.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2009-04-30 01:34:38 UTC (rev 2151)
+++ trunk/grub2/ChangeLog       2009-04-30 13:17:10 UTC (rev 2152)
@@ -1,3 +1,8 @@
+2009-04-30  David S. Miller  <address@hidden>
+
+       * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
+       lettered partition specifier is found, convert to numbered.
+
 2009-04-29  David S. Miller  <address@hidden>
 
        * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.

Modified: trunk/grub2/kern/sparc64/ieee1275/init.c
===================================================================
--- trunk/grub2/kern/sparc64/ieee1275/init.c    2009-04-30 01:34:38 UTC (rev 
2151)
+++ trunk/grub2/kern/sparc64/ieee1275/init.c    2009-04-30 13:17:10 UTC (rev 
2152)
@@ -64,8 +64,8 @@
   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 @@
        }
 
       /* 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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]