mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-29 13:01:52 -06:00
scsi: introduce scsi_sense_from_errno()
The new function is an extension of the switch statement in scsi-disk.c which also includes the errno cases only found in sg_io_sense_from_errno. This allows us to consolidate the errno handling. Extracted from a patch by Hannes Reinecke <hare@suse.de>. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
424740def9
commit
d7a84021db
3 changed files with 51 additions and 47 deletions
|
@ -135,4 +135,6 @@ int sg_io_sense_from_errno(int errno_value, struct sg_io_hdr *io_hdr,
|
|||
SCSISense *sense);
|
||||
#endif
|
||||
|
||||
int scsi_sense_from_errno(int errno_value, SCSISense *sense);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue