qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Hrdina <phrdina@redhat.com>
To: qemu-devel@nongnu.org
Cc: Pavel Hrdina <phrdina@redhat.com>
Subject: [Qemu-devel] [PATCH v3 1/4] fdc: fix implied seek while there is no medina in drive
Date: Tue, 12 Jun 2012 13:19:34 +0200	[thread overview]
Message-ID: <ddca1be2b6ae08d3df41d0e16b4651c8bccf304b.1339499796.git.phrdina@redhat.com> (raw)
In-Reply-To: <cover.1339499796.git.phrdina@redhat.com>
In-Reply-To: <cover.1339499796.git.phrdina@redhat.com>

The Windows uses 'READ' command at the start of an instalation
without checking the 'dir' register. We have to abort the transfer
with an abnormal termination if there is no media in the drive.

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

diff --git a/hw/fdc.c b/hw/fdc.c
index 30d34e3..096aefc 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -159,6 +159,9 @@ static int fd_seek(FDrive *drv, uint8_t head, uint8_t track, uint8_t sect,
         drv->sect = sect;
     }
 
+    if (drv->bs == NULL || !bdrv_is_inserted(drv->bs))
+        ret = 2;
+
     return ret;
 }
 
-- 
1.7.7.6

  reply	other threads:[~2012-06-12 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 11:19 [Qemu-devel] [PATCH v3 0/4] fdc: fix/rewrite seek, media_changed and interrupt handling Pavel Hrdina
2012-06-12 11:19 ` Pavel Hrdina [this message]
2012-06-12 11:19 ` [Qemu-devel] [PATCH v3 2/4] fdc-test: introduced qtest read_without_media Pavel Hrdina
2012-06-12 11:19 ` [Qemu-devel] [PATCH v3 3/4] fdc: rewrite seek and DSKCHG bit handling Pavel Hrdina
2012-06-12 13:03   ` Paolo Bonzini
2012-06-12 11:19 ` [Qemu-devel] [PATCH v3 4/4] fdc: fix interrupt handling Pavel Hrdina
2012-06-12 12:59   ` Paolo Bonzini
2012-06-13 11:43     ` Pavel Hrdina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ddca1be2b6ae08d3df41d0e16b4651c8bccf304b.1339499796.git.phrdina@redhat.com \
    --to=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).