From: Vladimir 'phcoder' Serbinenko Date: Thu, 3 May 2012 22:07:55 +0000 (+0200) Subject: * grub-core/kern/emu/hostdisk.c (read_device_map): Skip invalid Fedora X-Git-Tag: 2.00~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f6ac15e8490bc6855474eec11df004358ffb2e3;p=thirdparty%2Fgrub.git * grub-core/kern/emu/hostdisk.c (read_device_map): Skip invalid Fedora entries. --- diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index 706a1158c..e3d8c8f7d 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -1248,6 +1248,22 @@ read_device_map (const char *dev_map) strncpy (map[drive].drive, e, p - e + sizeof ('\0')); map[drive].drive[p - e] = '\0'; } + if (*ptr == ',') + { + *p = 0; + + /* TRANSLATORS: device.map is a file indicating which + devices are available at boot time. Fedora populated it with + entries like (hd0,1) /dev/sda1 which would mean that every + partition is a separate disk for BIOS. Such entries were + inactive in GRUB due to its bug which is now gone. Without + this additional check these entries would be harmful now. + */ + grub_util_warn (_("the device.map entry `%s' is invalid. " + "Ignoring it. Please correct or " + "delete your device.map"), e); + continue; + } } drive_e = e; drive_p = p;