]> git.proxmox.com Git - mirror_qemu.git/commit
fdc: fix detection under Linux
authorJohn Snow <jsnow@redhat.com>
Wed, 3 Feb 2016 16:28:55 +0000 (11:28 -0500)
committerJohn Snow <jsnow@redhat.com>
Wed, 3 Feb 2016 16:28:55 +0000 (11:28 -0500)
commitfd9bdbd3459e5b9d51534f0747049bc5b6145e07
tree0588a8a02f6b99914cb8c9cf3a365577a5ed6ab2
parent87574621b18f86eab295a2c207e0b42c77b5dfa0
fdc: fix detection under Linux

Accidentally, I removed a "feature" where empty drives had geometry
values applied to them, which allows seek on empty drives to work
"by accident," as QEMU actually tries to disallow that.

Seeks on empty drives should work, though, but the easiest thing is to
restore the misfeature where empty drives have non-zero geometries
applied.

Document the hack accordingly.

[Maintainer edit]

This fix corrects a regression introduced in d5d47efc, where
pick_geometry was modified such that it would not operate on empty
drives, and as a result if there is no diskette inserted, QEMU
no longer populates it with geometry bounds. As a result, seek fails
when QEMU denies to move the current track, but reports success anyway.
This can confuse the guest, leading to kernel panics in the guest.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1454106932-17236-1-git-send-email-jsnow@redhat.com
hw/block/fdc.c