scsi-generic: do not snoop the output of failed commands
commit9738c657208800298a7d68272b861fb2dc49fee1
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 6 Mar 2021 10:24:12 +0000 (6 11:24 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 6 Mar 2021 10:42:56 +0000 (6 11:42 +0100)
treed1f27a5bac46be1e449b2d82621f911fa93dfee6
parentdb66a15cb80f09da24a5311a3f3b8f0c1835bf71
scsi-generic: do not snoop the output of failed commands

If a READ CAPACITY command would fail, for example s->qdev.blocksize would be
set to zero and cause a division by zero on the next use.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-generic.c