diff --git a/ChangeLog b/ChangeLog index fc8b21c1e..26b2ceab2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-20 Vladimir Serbinenko + + * grub-core/kern/main.c (grub_set_prefix_and_root): Skip escaped commas + when looking for partition separator. + 2012-06-20 Vladimir Serbinenko * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname): diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c index 185230c5c..de9ba927e 100644 --- a/grub-core/kern/main.c +++ b/grub-core/kern/main.c @@ -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);