summaryrefslogtreecommitdiff
blob: 6bb28626172bac4cffd1f4c7ec257cf0779e13e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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