mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
iscsi: base all handling of check condition on scsi_sense_to_errno
Now that scsi-disk is not using scsi_sense_to_errno to separate guest-recoverable sense codes, we can modify it to simplify iscsi's own sense handling. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
00e3cccdf4
commit
8c460269aa
2 changed files with 16 additions and 18 deletions
|
@ -379,8 +379,7 @@ int scsi_sense_to_errno(int key, int asc, int ascq)
|
|||
case NO_SENSE:
|
||||
case RECOVERED_ERROR:
|
||||
case UNIT_ATTENTION:
|
||||
/* These sense keys are not errors */
|
||||
return 0;
|
||||
return EAGAIN;
|
||||
case ABORTED_COMMAND: /* COMMAND ABORTED */
|
||||
return ECANCELED;
|
||||
case NOT_READY:
|
||||
|
@ -409,7 +408,7 @@ int scsi_sense_to_errno(int key, int asc, int ascq)
|
|||
case 0x2700: /* WRITE PROTECTED */
|
||||
return EACCES;
|
||||
case 0x0401: /* NOT READY, IN PROGRESS OF BECOMING READY */
|
||||
return EAGAIN;
|
||||
return EINPROGRESS;
|
||||
case 0x0402: /* NOT READY, INITIALIZING COMMAND REQUIRED */
|
||||
return ENOTCONN;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue