]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/main.c (grub_set_prefix_and_root): Skip escaped commas
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 20 Jun 2012 21:33:34 +0000 (23:33 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 20 Jun 2012 21:33:34 +0000 (23:33 +0200)
when looking for partition separator.

ChangeLog
grub-core/kern/main.c

index fc8b21c1e03c9e7f9495aa10b50b2d0ee95e0f53..26b2ceab2c26a703c54e132a4e40599669f591e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/kern/main.c (grub_set_prefix_and_root): Skip escaped commas
+       when looking for partition separator.
+
 2012-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
index 185230c5c3cc01f81829d80245fc140c8d265cc8..de9ba927ec1279670305e0ad3b31480e2b34d8fb 100644 (file)
@@ -141,8 +141,18 @@ grub_set_prefix_and_root (void)
       /* We have a partition, but still need to fill in the drive.  */
       char *comma, *new_device;
 
-      comma = grub_strchr (fwdevice, ',');
-      if (comma)
+      for (comma = fwdevice; *comma; )
+       {
+         if (comma[0] == '\\' && comma[1] == ',')
+           {
+             comma += 2;
+             continue;
+           }
+         if (*comma == ',')
+           break;
+         comma++;
+       }
+      if (*comma)
        {
          char *drive = grub_strndup (fwdevice, comma - fwdevice);
          new_device = grub_xasprintf ("%s%s", drive, device);