]> git.proxmox.com Git - mirror_qemu.git/commit
scsi: introduce scsi_sense_from_errno()
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Feb 2021 15:30:09 +0000 (16:30 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 25 Feb 2021 13:14:32 +0000 (14:14 +0100)
commitd7a84021db8eeddcd5d24ab591a1434763caff6c
treeb176dbb666400680650b9f5a0fc8b22855ffcb65
parent424740def9a42da88550410de9a41ef07cc4a010
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>
hw/scsi/scsi-disk.c
include/scsi/utils.h
scsi/utils.c