scsi: Introduce scsi_sense_buf_to_errno
commita485b23425c755867d6caa6ab590be4e0473e35a
authorFam Zheng <famz@redhat.com>
Mon, 21 Aug 2017 14:10:07 +0000 (21 22:10 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Sep 2017 12:09:11 +0000 (19 14:09 +0200)
treef22197ab32440478a02c7444ec7154cb75e63cf1
parent5efa3c04483d408a03ff5f018842501a2048a51b
scsi: Introduce scsi_sense_buf_to_errno

This recognizes the "fixed" and "descriptor" format sense data, extracts
the sense key/asc/ascq fields then converts them to an errno.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170821141008.19383-4-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/scsi/scsi.h
util/scsi.c