summary refs log tree commit diff stats
path: root/include/system/block-backend-io.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-11-11 18:03:32 +0100
committerKevin Wolf <kwolf@redhat.com>2025-02-06 13:59:00 +0100
commit84d388c22b8e34981539fd3c69f84099f1824f1f (patch)
tree3c7f05e2d969d13b0f9d544108187d3d35157345 /include/system/block-backend-io.h
parent558d8eb7f32dda8634e0d3e82ac36e00bf61c9ee (diff)
downloadfocaccia-qemu-84d388c22b8e34981539fd3c69f84099f1824f1f.tar.gz
focaccia-qemu-84d388c22b8e34981539fd3c69f84099f1824f1f.zip
block: Improve blk_get_attached_dev_id() docstring
Expose the method docstring in the header, and mention
returned value must be free'd by caller.

Reported-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241111170333.43833-2-philmd@linaro.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/system/block-backend-io.h')
-rw-r--r--include/system/block-backend-io.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/system/block-backend-io.h b/include/system/block-backend-io.h
index d174275a5c..ba8dfcc7d0 100644
--- a/include/system/block-backend-io.h
+++ b/include/system/block-backend-io.h
@@ -32,6 +32,13 @@ void blk_set_allow_aio_context_change(BlockBackend *blk, bool allow);
 void blk_set_disable_request_queuing(BlockBackend *blk, bool disable);
 bool blk_iostatus_is_enabled(const BlockBackend *blk);
 
+/*
+ * Return the qdev ID, or if no ID is assigned the QOM path,
+ * of the block device attached to the BlockBackend.
+ *
+ * The caller is responsible for releasing the value returned
+ * with g_free() after use.
+ */
 char *blk_get_attached_dev_id(BlockBackend *blk);
 
 BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset,