diff options
| author | Peter Xu <peterx@redhat.com> | 2024-11-21 14:21:58 -0500 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-09 18:16:24 +0100 |
| commit | 41fc91772841c93c218df78d7e359cb2cd00dff5 (patch) | |
| tree | 3338137939c1d32cdb3648582f8ec59e03dedd87 /include/hw/qdev-core.h | |
| parent | 63450f322bf76faab7add3def89815d9198492dc (diff) | |
| download | focaccia-qemu-41fc91772841c93c218df78d7e359cb2cd00dff5.tar.gz focaccia-qemu-41fc91772841c93c218df78d7e359cb2cd00dff5.zip | |
qdev: Add machine_get_container()
Add a helper to fetch machine containers. Add some sanity check around. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Xu <peterx@redhat.com> Message-ID: <20241121192202.4155849-10-peterx@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/qdev-core.h')
| -rw-r--r-- | include/hw/qdev-core.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 50cbbf8121..89575e74e2 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -1034,6 +1034,16 @@ Object *qdev_get_machine(void); void qdev_create_fake_machine(void); /** + * machine_get_container: + * @name: The name of container to lookup + * + * Get a container of the machine (QOM path "/machine/NAME"). + * + * Returns: the machine container object. + */ +Object *machine_get_container(const char *name); + +/** * qdev_get_human_name() - Return a human-readable name for a device * @dev: The device. Must be a valid and non-NULL pointer. * |