Files
sablink-distro/sys-boot/grub/files/ubuntu-upstream/904_disable_floppies.diff
T
2010-03-04 18:01:47 +01:00

29 lines
743 B
Diff

Author: Robert Millan
An ugly kludge. Should this be merged upstream?
Index: util/hostdisk.c
===================================================================
--- util/hostdisk.c (revision 1832)
+++ util/hostdisk.c (working copy)
@@ -544,6 +544,18 @@
continue;
}
+ if (! strncmp (p, "/dev/fd", sizeof ("/dev/fd") - 1))
+ {
+ char *q = p + sizeof ("/dev/fd") - 1;
+ if (*q >= '0' && *q <= '9')
+ {
+ free (map[drive].drive);
+ map[drive].drive = NULL;
+ grub_util_info ("`%s' looks like a floppy drive, skipping", p);
+ continue;
+ }
+ }
+
#ifdef __linux__
/* On Linux, the devfs uses symbolic links horribly, and that
confuses the interface very much, so use realpath to expand