diff options
author | Fam Zheng <famz@redhat.com> | 2016-09-14 18:17:03 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-14 12:25:13 +0200 |
commit | cd723b85601baa7a0eeffbac83421357a70d81ee (patch) | |
tree | b320189c315a9f6fd067650de1df76a45d5641e4 /hw/i2c | |
parent | 083d012a388e7e2a8bfd9144c2c9bcceb29a78fc (diff) | |
download | qemu-cd723b85601baa7a0eeffbac83421357a70d81ee.zip qemu-cd723b85601baa7a0eeffbac83421357a70d81ee.tar.gz qemu-cd723b85601baa7a0eeffbac83421357a70d81ee.tar.bz2 |
scsi-disk: Cleaning up around tray open state
Even if tray is not open, it can be empty (blk_is_inserted() == false).
Handle both cases correctly by replacing the s->tray_open checks with
blk_is_available(), which is an AND of the two.
Also simplify successive checks of them into blk_is_available(), in a
couple cases.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1473848224-24809-2-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i2c')
0 files changed, 0 insertions, 0 deletions