aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/block.c b/block.c
index d1bf121ffa..bdd33383e8 100644
--- a/block.c
+++ b/block.c
@@ -3140,14 +3140,16 @@ void bdrv_invalidate_cache_all(Error **errp)
/**
* Return TRUE if the media is present
*/
-int bdrv_is_inserted(BlockDriverState *bs)
+bool bdrv_is_inserted(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
- if (!drv)
- return 0;
- if (!drv->bdrv_is_inserted)
- return 1;
+ if (!drv) {
+ return false;
+ }
+ if (!drv->bdrv_is_inserted) {
+ return true;
+ }
return drv->bdrv_is_inserted(bs);
}