[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/12] qdev: Add machine_get_container()
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 09/12] qdev: Add machine_get_container() |
Date: |
Thu, 21 Nov 2024 14:23:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Peter Xu <peterx@redhat.com> writes:
> Add a helper to fetch machine containers. Add some sanity check around.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> include/hw/qdev-core.h | 10 ++++++++++
> hw/core/qdev.c | 17 +++++++++++++++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index 5be9844412..38edfb1b54 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -996,6 +996,16 @@ const char *qdev_fw_name(DeviceState *dev);
> void qdev_assert_realized_properly(void);
> Object *qdev_get_machine(void);
>
> +/**
> + * machine_get_container:
> + * @name: The name of container to lookup
> + *
> + * Get a container of the machine (QOM path "/machine/XXX").
Suggest "/machine/NAME" here.
> + *
> + * 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.
[...]
- [PATCH 06/12] hw/ppc: Explicitly create the drc container, (continued)
- [PATCH 06/12] hw/ppc: Explicitly create the drc container, Peter Xu, 2024/11/20
- [PATCH 08/12] qdev: Make qdev_get_machine() not use container_get(), Peter Xu, 2024/11/20
- [PATCH 09/12] qdev: Add machine_get_container(), Peter Xu, 2024/11/20
- [PATCH 10/12] qom: Create system containers explicitly, Peter Xu, 2024/11/20
- Re: [PATCH 10/12] qom: Create system containers explicitly, Philippe Mathieu-Daudé, 2024/11/21
- Re: [PATCH 10/12] qom: Create system containers explicitly, Daniel P . Berrangé, 2024/11/21
- Re: [PATCH 10/12] qom: Create system containers explicitly, Philippe Mathieu-Daudé, 2024/11/21
- Re: [PATCH 10/12] qom: Create system containers explicitly, Peter Xu, 2024/11/21
- Re: [PATCH 10/12] qom: Create system containers explicitly, Philippe Mathieu-Daudé, 2024/11/21
- Re: [PATCH 10/12] qom: Create system containers explicitly, Peter Xu, 2024/11/21
- Re: [PATCH 10/12] qom: Create system containers explicitly, Philippe Mathieu-Daudé, 2024/11/21
- Re: [PATCH 10/12] qom: Create system containers explicitly, Markus Armbruster, 2024/11/21