qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 01/12] scsi: pass correct sense code for ENOMEDIUM


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 01/12] scsi: pass correct sense code for ENOMEDIUM
Date: Tue, 20 Sep 2011 17:26:35 +0200

Signed-off-by: Paolo Bonzini <address@hidden>
---
 hw/scsi-disk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 48abe49..534baa2 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -230,6 +230,9 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, 
int type)
         vm_stop(VMSTOP_DISKFULL);
     } else {
         switch (error) {
+        case ENOMEDIUM:
+            scsi_check_condition(r, SENSE_CODE(NO_MEDIUM));
+            break;
         case ENOMEM:
             scsi_check_condition(r, SENSE_CODE(TARGET_FAILURE));
             break;
-- 
1.7.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]