mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
block: Add BdrvChildRole.get_parent_desc()
For meaningful error messages in the permission system, we need to get some human-readable description of the parent of a BdrvChild. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Acked-by: Fam Zheng <famz@redhat.com>
This commit is contained in:
parent
c6cc12bfa7
commit
b541155587
3 changed files with 36 additions and 0 deletions
|
@ -452,6 +452,12 @@ struct BdrvChildRole {
|
|||
* name), or NULL if the parent can't provide a better name. */
|
||||
const char* (*get_name)(BdrvChild *child);
|
||||
|
||||
/* Returns a malloced string that describes the parent of the child for a
|
||||
* human reader. This could be a node-name, BlockBackend name, qdev ID or
|
||||
* QOM path of the device owning the BlockBackend, job type and ID etc. The
|
||||
* caller is responsible for freeing the memory. */
|
||||
char* (*get_parent_desc)(BdrvChild *child);
|
||||
|
||||
/*
|
||||
* If this pair of functions is implemented, the parent doesn't issue new
|
||||
* requests after returning from .drained_begin() until .drained_end() is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue