aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-08-21 22:10:07 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2017-09-19 14:09:11 +0200
commita485b23425c755867d6caa6ab590be4e0473e35a (patch)
treef22197ab32440478a02c7444ec7154cb75e63cf1 /include/scsi
parent5efa3c04483d408a03ff5f018842501a2048a51b (diff)
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>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index f894ace4bf..fe330385d8 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -15,5 +15,6 @@
#define QEMU_SCSI_H
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);
#endif