mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
scsi: explicitly list guest-recoverable sense codes
It's not really possible to fit all sense codes into errno codes, especially in such a way that sense codes can be properly categorized as either guest-recoverable or host-handled. Create a new function that checks for guest recoverable sense, then scsi_sense_buf_to_errno only needs to be called for host handled sense codes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@ -106,6 +106,7 @@ extern const struct SCSISense sense_code_SPACE_ALLOC_FAILED;
|
||||
|
||||
int scsi_sense_to_errno(int key, int asc, int ascq);
|
||||
int scsi_sense_buf_to_errno(const uint8_t *sense, size_t sense_size);
|
||||
bool scsi_sense_buf_is_guest_recoverable(const uint8_t *sense, size_t sense_size);
|
||||
|
||||
int scsi_convert_sense(uint8_t *in_buf, int in_len,
|
||||
uint8_t *buf, int len, bool fixed);
|
||||
|
Reference in New Issue
Block a user