block: Add blk_dev_has_tray()
commit8f3a73bc57ea83e5b3930d14fc596ea51859987a
authorMax Reitz <mreitz@redhat.com>
Fri, 29 Jan 2016 19:49:10 +0000 (29 20:49 +0100)
committerMax Reitz <mreitz@redhat.com>
Tue, 2 Feb 2016 16:46:56 +0000 (2 17:46 +0100)
tree21bd3e63ac68303a980d9f4d553ff4e97d7fc78f
parentd2ea854c382d4d080de1f149167e60290108f79b
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
block/block-backend.c
include/block/block_int.h