mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
scsi: pass correct sense code for ENOMEDIUM
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
committed by
Kevin Wolf
parent
d99902287c
commit
7e218df518
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user