mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00: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:
@ -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
|
||||
|
Reference in New Issue
Block a user