qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix sparc booting with no CD in drive
@ 2006-08-13 20:00 Blue Swirl
  2006-08-14 15:08 ` [Qemu-devel] " Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2006-08-13 20:00 UTC (permalink / raw)
  To: paul; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

If there is no CD in drive, sparc system emulator fails to boot. This 
happens because error handling is a bit broken in scsi-disk.c. The older 
OpenBIOS just didn't care.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

[-- Attachment #2: scsi-fix.diff --]
[-- Type: text/plain, Size: 772 bytes --]

Fix booting without CD in drive.

Index: qemu/hw/scsi-disk.c
===================================================================
--- qemu.orig/hw/scsi-disk.c	2006-08-13 19:44:42.000000000 +0000
+++ qemu/hw/scsi-disk.c	2006-08-13 19:49:58.000000000 +0000
@@ -109,8 +109,10 @@
     uint32_t n;

     DPRINTF("Read %d (%d/%d)\n", len, s->buf_len, s->sector_count);
-    if (s->buf_len == 0 && s->sector_count == 0)
+    if (s->buf_len == 0 && s->sector_count == 0) {
+        scsi_command_complete(s, SENSE_NO_SENSE);
         return 1;
+    }

     if (s->buf_len) {
         n = s->buf_len;
@@ -447,6 +449,7 @@
             s->buf_len = 8;
         } else {
             scsi_command_complete(s, SENSE_NOT_READY);
+            return 0;
         }
	break;
     case 0x08:


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

end of thread, other threads:[~2006-08-15 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-13 20:00 [Qemu-devel] [PATCH] Fix sparc booting with no CD in drive Blue Swirl
2006-08-14 15:08 ` [Qemu-devel] " Paul Brook
2006-08-15 15:45   ` Blue Swirl
2006-08-15 17:45     ` Paul Brook

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).