Max Reitz db0284f86a block: Add blk_is_available()
blk_is_available() returns true iff the BDS is inserted (which means
blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the
tray of the guest device is closed.

blk_is_inserted() is changed to return true only if blk_bs() is not
NULL.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-10-23 18:18:22 +02:00
..
2015-10-23 18:18:22 +02:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:29 +02:00
2015-04-28 15:36:09 +02:00
2015-10-16 15:34:30 +02:00
2015-10-16 15:34:29 +02:00
2015-07-14 17:15:23 +02:00
2015-09-25 10:25:19 -04:00
2015-10-08 19:46:01 +03:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:30 +02:00