summaryrefslogtreecommitdiffstats
path: root/debian/patches/disable-floppies.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
commit8e67fbf68ffeb9eb5f026dd482d73b021660bf9b (patch)
treebb573facd5d02096f9956b2617a722b88acaa8af /debian/patches/disable-floppies.patch
parentAdding upstream version 2.06. (diff)
downloadgrub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.tar.xz
grub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.zip
Adding debian version 2.06-3~deb11u6.debian/2.06-3_deb11u6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches/disable-floppies.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/disable-floppies.patch b/debian/patches/disable-floppies.patch
new file mode 100644
index 0000000..ee4ae5a
--- /dev/null
+++ b/debian/patches/disable-floppies.patch
@@ -0,0 +1,37 @@
+From 6a1ff6845e571d2a9885763a3e52a16a9eec54bb Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@debian.org>
+Date: Mon, 13 Jan 2014 12:12:54 +0000
+Subject: Disable use of floppy devices
+
+An ugly kludge. Should this be merged upstream?
+
+Author: Robert Millan
+
+Patch-Name: disable-floppies.patch
+---
+ grub-core/kern/emu/hostdisk.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c
+index d975265b2..f90b6c9ce 100644
+--- a/grub-core/kern/emu/hostdisk.c
++++ b/grub-core/kern/emu/hostdisk.c
+@@ -532,6 +532,18 @@ read_device_map (const char *dev_map)
+ 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;
++ }
++ }
++
+ /* On Linux, the devfs uses symbolic links horribly, and that
+ confuses the interface very much, so use realpath to expand
+ symbolic links. */