aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-08-22 09:42:59 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-09-19 14:09:11 +0200
commita3760467c6b0ff5d1ff952fdc8cec69c65e19499 (patch)
tree86855a5ca393b010cce54a8544b996af10ec2b08 /include/scsi
parente5b5728cd330f533e02e483af8973ad7ffccce8b (diff)
scsi: introduce scsi_build_sense
Move more knowledge of sense data format out of hw/scsi/scsi-bus.c for reusability. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi/utils.h b/include/scsi/utils.h
index 90bf4dce6e..b49392d841 100644
--- a/include/scsi/utils.h
+++ b/include/scsi/utils.h
@@ -30,6 +30,8 @@ typedef struct SCSISense {
uint8_t ascq;
} SCSISense;
+int scsi_build_sense(uint8_t *buf, SCSISense sense);
+
/*
* Predefined sense codes
*/