block: Prevent detection of /dev/fdset/ as floppy

Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Corey Bryant 2012-08-14 16:43:44 -04:00 committed by Kevin Wolf
parent ba1c048a8f
commit e174082835
1 changed files with 3 additions and 1 deletions

View File

@ -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) {