aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorLi Qiang <liq3ea@163.com>2018-10-13 01:52:31 -0700
committerKevin Wolf <kwolf@redhat.com>2018-11-05 15:09:54 +0100
commit967105651bad6560f54eeb8ba17ac41a9a1f5eb5 (patch)
treedd2b7f53de9c40112f4eb5ced6c27516d5dabd87 /block
parent6f8f015c0cd9f3ea44de4d73144db98beef97e3c (diff)
downloadqemu-967105651bad6560f54eeb8ba17ac41a9a1f5eb5.zip
qemu-967105651bad6560f54eeb8ba17ac41a9a1f5eb5.tar.gz
qemu-967105651bad6560f54eeb8ba17ac41a9a1f5eb5.tar.bz2
block: change some function return type to bool
Signed-off-by: Li Qiang <liq3ea@163.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/block-backend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index dc0cd57..2a8f3b5 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1708,7 +1708,7 @@ void blk_error_action(BlockBackend *blk, BlockErrorAction action,
}
}
-int blk_is_read_only(BlockBackend *blk)
+bool blk_is_read_only(BlockBackend *blk)
{
BlockDriverState *bs = blk_bs(blk);
@@ -1719,18 +1719,18 @@ int blk_is_read_only(BlockBackend *blk)
}
}
-int blk_is_sg(BlockBackend *blk)
+bool blk_is_sg(BlockBackend *blk)
{
BlockDriverState *bs = blk_bs(blk);
if (!bs) {
- return 0;
+ return false;
}
return bdrv_is_sg(bs);
}
-int blk_enable_write_cache(BlockBackend *blk)
+bool blk_enable_write_cache(BlockBackend *blk)
{
return blk->enable_write_cache;
}