scsi-disk: pass sense correctly for guest-recoverable errors
commitd31347f5ff6c637a11245d244ff5449a94bf8256
authorShinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 2 Jul 2019 08:08:00 +0000 (2 10:08 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Jul 2019 09:20:42 +0000 (15 11:20 +0200)
tree16022e2dd261b1a48f056a45d953f08680b58252
parent46cd24e7ed38191b5ab5c40a836d6c5b6b604f8a
scsi-disk: pass sense correctly for guest-recoverable errors

When an error was passed down to the guest because it was recoverable,
the sense length was not copied from the SG_IO data.  As a result,
the guest saw the CHECK CONDITION status but not the sense data.

Signed-off-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-disk.c