diff options
author | Max Reitz <mreitz@redhat.com> | 2016-01-29 20:49:10 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2016-03-17 16:23:28 -0500 |
commit | e1a8a0912489d667ab7b35f8dd6ae9ec1de7ca20 (patch) | |
tree | 148bdbbb4aeb309bf542e6e220c9ccec79894507 /include | |
parent | 7a2c1c8e66d17125c5b3fe214bd8c103b87bb895 (diff) | |
download | qemu-e1a8a0912489d667ab7b35f8dd6ae9ec1de7ca20.zip qemu-e1a8a0912489d667ab7b35f8dd6ae9ec1de7ca20.tar.gz qemu-e1a8a0912489d667ab7b35f8dd6ae9ec1de7ca20.tar.bz2 |
block: Add blk_dev_has_tray()
Pull out the check whether a block device has a tray from
blk_dev_is_tray_open() into its own function so both attributes (whether
there is a tray vs. whether that tray is open) can be queried
independently.
Cc: qemu-stable <qemu-stable@nongnu.org>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 1454096953-31773-2-git-send-email-mreitz@redhat.com
(cherry picked from commit 8f3a73bc57ea83e5b3930d14fc596ea51859987a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block_int.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 4012e36..7029d41 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -686,6 +686,7 @@ void blk_set_bs(BlockBackend *blk, BlockDriverState *bs); void blk_dev_change_media_cb(BlockBackend *blk, bool load); bool blk_dev_has_removable_media(BlockBackend *blk); +bool blk_dev_has_tray(BlockBackend *blk); void blk_dev_eject_request(BlockBackend *blk, bool force); bool blk_dev_is_tray_open(BlockBackend *blk); bool blk_dev_is_medium_locked(BlockBackend *blk); |