summaryrefslogtreecommitdiffstats
path: root/master/debian/disable_floppies.patch
diff options
context:
space:
mode:
authorroot <root@arianrhod.panaceas.james.local>2012-11-16 11:52:02 +0000
committerroot <root@arianrhod.panaceas.james.local>2012-11-16 11:52:02 +0000
commita109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce (patch)
tree9a6b9c35465b23ce5871feec5e9ba0c7d5ac7797 /master/debian/disable_floppies.patch
downloadgrub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.tar.gz
grub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.tar.bz2
grub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.zip
fish
Diffstat (limited to 'master/debian/disable_floppies.patch')
-rw-r--r--master/debian/disable_floppies.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/master/debian/disable_floppies.patch b/master/debian/disable_floppies.patch
new file mode 100644
index 0000000..6bb2862
--- /dev/null
+++ b/master/debian/disable_floppies.patch
@@ -0,0 +1,28 @@
+
+Author: Robert Millan
+
+An ugly kludge. Should this be merged upstream?
+
+Index: b/grub-core/kern/emu/hostdisk.c
+===================================================================
+--- a/grub-core/kern/emu/hostdisk.c
++++ b/grub-core/kern/emu/hostdisk.c
+@@ -1077,6 +1077,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