From 7e218df5181f1c26d52ef525b30a416c60a2160b Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 19 Sep 2011 17:19:21 +0200 Subject: scsi: pass correct sense code for ENOMEDIUM Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-disk.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw/scsi-disk.c') diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 69095780ac..9c62569a17 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -231,6 +231,9 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type) bdrv_iostatus_set_err(s->bs, error); } 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; -- cgit v1.2.3