diff options
author | 2016-09-14 18:17:03 +0800 | |
---|---|---|
committer | 2016-09-14 12:25:13 +0200 | |
commit | cd723b85601baa7a0eeffbac83421357a70d81ee (patch) | |
tree | b320189c315a9f6fd067650de1df76a45d5641e4 /util/bufferiszero.c | |
parent | cutils: Add generic prefetch (diff) | |
download | qemu-cd723b85601baa7a0eeffbac83421357a70d81ee.tar.xz qemu-cd723b85601baa7a0eeffbac83421357a70d81ee.zip |
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 'util/bufferiszero.c')
0 files changed, 0 insertions, 0 deletions