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:
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;
|
||||
|
Loading…
Reference in New Issue
Block a user