2006-09-14 Robert Millan * util/i386/pc/grub-mkdevicemap.c: Make sure floppy device exists before adding it to device.map. Index: util/i386/pc/grub-mkdevicemap.c =================================================================== RCS file: /sources/grub/grub2/util/i386/pc/grub-mkdevicemap.c,v retrieving revision 1.2 diff -u -r1.2 grub-mkdevicemap.c --- util/i386/pc/grub-mkdevicemap.c 24 Jul 2005 18:16:25 -0000 1.2 +++ util/i386/pc/grub-mkdevicemap.c 14 Sep 2006 17:54:36 -0000 @@ -378,8 +378,11 @@ for (i = 0; i < floppy_disks; i++) { char name[16]; + struct stat st; get_floppy_disk_name (name, i); + if (stat (name, &st) < 0) + break; /* In floppies, write the map, whether check_device succeeds or not, because the user just may not insert floppies. */ if (fp)