| Submitter | Corey Bryant |
|---|---|
| Date | June 22, 2012, 6:36 p.m. |
| Message ID | <1340390174-7493-6-git-send-email-coreyb@linux.vnet.ibm.com> |
| Download | mbox | patch |
| Permalink | /patch/166657/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/block/raw-posix.c b/block/raw-posix.c index 03fcfcc..0d9be0b 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -946,9 +946,11 @@ static int floppy_probe_device(const char *filename) int prio = 0; struct floppy_struct fdparam; struct stat st; + const char *p; - if (strstart(filename, "/dev/fd", NULL)) + if (strstart(filename, "/dev/fd", &p) && p[0] != '/') { prio = 50; + } fd = open(filename, O_RDONLY | O_NONBLOCK); if (fd < 0) {