Skip to content
Commit 3550eeaf authored by Fam Zheng's avatar Fam Zheng Committed by Michael Roth
Browse files

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: default avatarFam Zheng <famz@redhat.com>
Message-Id: <1473848224-24809-2-git-send-email-famz@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit cd723b85)
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 316c2c94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment