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);
|
bdrv_iostatus_set_err(s->bs, error);
|
||||||
} else {
|
} else {
|
||||||
switch (error) {
|
switch (error) {
|
||||||
|
case ENOMEDIUM:
|
||||||
|
scsi_check_condition(r, SENSE_CODE(NO_MEDIUM));
|
||||||
|
break;
|
||||||
case ENOMEM:
|
case ENOMEM:
|
||||||
scsi_check_condition(r, SENSE_CODE(TARGET_FAILURE));
|
scsi_check_condition(r, SENSE_CODE(TARGET_FAILURE));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue