qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fdc: fix media change detection for windows
@ 2012-06-05 13:48 Pavel Hrdina
  2012-06-05 14:02 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Hrdina @ 2012-06-05 13:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, mtosatti, armbru, Pavel Hrdina

The windows uses 'READ' command at the start of instalation. We have to
also check the 'media_change' bit in the 'fd_seek'.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 hw/fdc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/fdc.c b/hw/fdc.c
index 30d34e3..70b0c00 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -128,7 +128,8 @@ static int fd_seek(FDrive *drv, uint8_t head, uint8_t track, uint8_t sect,
     int ret;
 
     if (track > drv->max_track ||
-        (head != 0 && (drv->flags & FDISK_DBL_SIDES) == 0)) {
+        (head != 0 && (drv->flags & FDISK_DBL_SIDES) == 0) ||
+        drv->media_changed) {
         FLOPPY_DPRINTF("try to read %d %02x %02x (max=%d %d %02x %02x)\n",
                        head, track, sect, 1,
                        (drv->flags & FDISK_DBL_SIDES) == 0 ? 0 : 1,
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-05 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05 13:48 [Qemu-devel] [PATCH] fdc: fix media change detection for windows Pavel Hrdina
2012-06-05 14:02 ` Kevin Wolf
2012-06-05 14:30   ` Pavel Hrdina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).