* [Qemu-devel] [PATCH] block: change some function return type to bool
@ 2018-10-13 8:52 Li Qiang
2018-10-15 9:17 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-10-15 10:07 ` [Qemu-devel] " Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Li Qiang @ 2018-10-13 8:52 UTC (permalink / raw)
To: kwolf, mreitz; +Cc: qemu-block, qemu-devel, Li Qiang
Signed-off-by: Li Qiang <liq3ea@163.com>
---
block/block-backend.c | 8 ++++----
include/sysemu/block-backend.h | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index dc0cd57724..2a8f3b55f8 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;
}
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 830d873f24..c96bcdee14 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -166,9 +166,9 @@ BlockErrorAction blk_get_error_action(BlockBackend *blk, bool is_read,
int error);
void blk_error_action(BlockBackend *blk, BlockErrorAction action,
bool is_read, int error);
-int blk_is_read_only(BlockBackend *blk);
-int blk_is_sg(BlockBackend *blk);
-int blk_enable_write_cache(BlockBackend *blk);
+bool blk_is_read_only(BlockBackend *blk);
+bool blk_is_sg(BlockBackend *blk);
+bool blk_enable_write_cache(BlockBackend *blk);
void blk_set_enable_write_cache(BlockBackend *blk, bool wce);
void blk_invalidate_cache(BlockBackend *blk, Error **errp);
bool blk_is_inserted(BlockBackend *blk);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH] block: change some function return type to bool
2018-10-13 8:52 [Qemu-devel] [PATCH] block: change some function return type to bool Li Qiang
@ 2018-10-15 9:17 ` Alberto Garcia
2018-10-15 10:07 ` [Qemu-devel] " Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Alberto Garcia @ 2018-10-15 9:17 UTC (permalink / raw)
To: Li Qiang, kwolf, mreitz; +Cc: qemu-devel, qemu-block
On Sat 13 Oct 2018 10:52:31 AM CEST, Li Qiang wrote:
> Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Berto
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: change some function return type to bool
2018-10-13 8:52 [Qemu-devel] [PATCH] block: change some function return type to bool Li Qiang
2018-10-15 9:17 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
@ 2018-10-15 10:07 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2018-10-15 10:07 UTC (permalink / raw)
To: Li Qiang; +Cc: mreitz, qemu-block, qemu-devel
Am 13.10.2018 um 10:52 hat Li Qiang geschrieben:
> Signed-off-by: Li Qiang <liq3ea@163.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-15 10:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-13 8:52 [Qemu-devel] [PATCH] block: change some function return type to bool Li Qiang
2018-10-15 9:17 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-10-15 10:07 ` [Qemu-devel] " Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).