Re: [PATCH v2 02/10] qdev: Export global_props()

Fabiano Rosas <[email protected]> Tue, 09 Jun 2026 19:55:56 -0300
Newsgroups org.nongnu.qemu-rust,org.nongnu.qemu-arm,org.nongnu.qemu-devel
Message-ID <[email protected]>
Peter Xu <[email protected]> writes:

> Make it accessible from outside (to apply -global properties).
>
> Signed-off-by: Peter Xu <[email protected]>
> ---
>  include/hw/core/qdev-properties.h | 2 ++
>  hw/core/qdev-properties.c         | 2 +-
>  rust/bindings/hwcore-sys/lib.rs   | 2 +-
>  3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/include/hw/core/qdev-properties.h b/include/hw/core/qdev-properties.h
> index eba5436e53..248bbcbba7 100644
> --- a/include/hw/core/qdev-properties.h
> +++ b/include/hw/core/qdev-properties.h
> @@ -321,4 +321,6 @@ void qdev_prop_allow_set_link_before_realize(const Object *obj,
>                                               const char *name,
>                                               Object *val, Error **errp);
>  
> +GPtrArray *global_props(void);
> +
>  #endif
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index 34d7b26a73..1d531189ec 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -958,7 +958,7 @@ void qlist_append_link(QList *qlist, Object *obj)
>      qlist_append_str(qlist, path);
>  }
>  
> -static GPtrArray *global_props(void)
> +GPtrArray *global_props(void)
>  {
>      static GPtrArray *gp;
>  
> diff --git a/rust/bindings/hwcore-sys/lib.rs b/rust/bindings/hwcore-sys/lib.rs
> index 8cef4a7961..85e71f5145 100644
> --- a/rust/bindings/hwcore-sys/lib.rs
> +++ b/rust/bindings/hwcore-sys/lib.rs
> @@ -20,7 +20,7 @@
>  
>  use chardev_sys::Chardev;
>  use common::Zeroable;
> -use glib_sys::GSList;
> +use glib_sys::{GPtrArray, GSList};
>  use migration_sys::VMStateDescription;
>  use qom_sys::{
>      InterfaceClass, Object, ObjectClass, ObjectProperty, ObjectPropertyAccessor,

Reviewed-by: Fabiano Rosas <[email protected]>