mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qdev: provide an interface to return canonical path from root (v2)
The canonical path is the path in the composition tree from the root to the device. This is effectively the name of the device. This is an incredibly unefficient implementation that will be optimized in a future patch. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
a10f07a7d0
commit
f9fbd2fd0e
2 changed files with 57 additions and 0 deletions
|
@ -490,4 +490,13 @@ void qdev_property_add_legacy(DeviceState *dev, Property *prop, Error **errp);
|
|||
*/
|
||||
DeviceState *qdev_get_root(void);
|
||||
|
||||
/**
|
||||
* @qdev_get_canonical_path - returns the canonical path for a device. This
|
||||
* is the path within the composition tree starting from the root.
|
||||
*
|
||||
* Returns:
|
||||
* The canonical path in the composition tree.
|
||||
*/
|
||||
gchar *qdev_get_canonical_path(DeviceState *dev);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue