From e17408283562be359f16a7e12ddfee7509d6fe11 Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Tue, 14 Aug 2012 16:43:44 -0400 Subject: block: Prevent detection of /dev/fdset/ as floppy Signed-off-by: Corey Bryant Signed-off-by: Kevin Wolf --- block/raw-posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 0dce089be5..f606211760 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1052,8 +1052,10 @@ static int floppy_probe_device(const char *filename) struct floppy_struct fdparam; struct stat st; - if (strstart(filename, "/dev/fd", NULL)) + if (strstart(filename, "/dev/fd", NULL) && + !strstart(filename, "/dev/fdset/", NULL)) { prio = 50; + } fd = open(filename, O_RDONLY | O_NONBLOCK); if (fd < 0) { -- cgit v1.2.1