diff options
author | Jiri Kosina <jkosina@suse.cz> | 2014-01-10 02:08:13 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-01-17 11:12:06 +0100 |
commit | 7b7b68bba5ef23734c35ffb0d8d82079ed604d33 (patch) | |
tree | d6ce0b6d4b7b4cecf42efa3a227b0d6ed29e12b7 /drivers/net/can/usb/usb_8dev.c | |
parent | 8586ea96b4f919a9b38929040bc9ce57c9998fc4 (diff) |
floppy: bail out in open() if drive is not responding to block0 read
In case reading of block 0 during open() fails, it is not the right thing
to let open() succeed.
Fix this by introducing FD_OPEN_SHOULD_FAIL_BIT flag, and setting it in
case the bio callback encounters an error while trying to read block 0.
As a bonus, this works around certain broken userspace (blkid), which is
not able to properly handle read()s returning IO errors. Hence be nice to
those, and bail out during open() already; if block 0 is not readable,
read()s are not going to provide any meaningful data anyway.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/net/can/usb/usb_8dev.c')
0 files changed, 0 insertions, 0 deletions