aboutsummaryrefslogtreecommitdiff
path: root/scsi/utils.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-12-01 18:40:06 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-12-20 22:29:26 +0100
commita4a9b6eaf35dbe4bf0e069854945bf5e45fc7eab (patch)
tree9db978a8f4394911b84fc4ac0430f868c048445a /scsi/utils.c
parent68a9398261ca38979bbc2b7c89ed5bb044ccc9e6 (diff)
downloadqemu-a4a9b6eaf35dbe4bf0e069854945bf5e45fc7eab.zip
qemu-a4a9b6eaf35dbe4bf0e069854945bf5e45fc7eab.tar.gz
qemu-a4a9b6eaf35dbe4bf0e069854945bf5e45fc7eab.tar.bz2
qemu-pr-helper: miscellaneous fixes
1) Return a generic sense if TEST UNIT READY does not provide one; 2) Fix two mistakes in copying from the spec. Cc: qemu-stable@nongnu.org Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scsi/utils.c')
-rw-r--r--scsi/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/scsi/utils.c b/scsi/utils.c
index 5684951..e4182a9 100644
--- a/scsi/utils.c
+++ b/scsi/utils.c
@@ -211,6 +211,16 @@ const struct SCSISense sense_code_LUN_COMM_FAILURE = {
.key = ABORTED_COMMAND, .asc = 0x08, .ascq = 0x00
};
+/* Medium Error, Unrecovered read error */
+const struct SCSISense sense_code_READ_ERROR = {
+ .key = MEDIUM_ERROR, .asc = 0x11, .ascq = 0x00
+};
+
+/* Not ready, Cause not reportable */
+const struct SCSISense sense_code_NOT_READY = {
+ .key = NOT_READY, .asc = 0x04, .ascq = 0x00
+};
+
/* Unit attention, Capacity data has changed */
const struct SCSISense sense_code_CAPACITY_CHANGED = {
.key = UNIT_ATTENTION, .asc = 0x2a, .ascq = 0x09