On Mon, Sep 14, 2026 at 09:30:56AM -1000, Richard Henderson wrote:
> On 9/10/26 00:36, Daniel P. Berrangé wrote:
> > @@ -161,9 +163,15 @@ static void qom_list_types_tramp(ObjectClass *klass,
> > void *opaque)
> > ObjectTypeInfo *info;
> > ObjectClass *parent = object_class_get_parent(klass);
> > + if (data->has_secure &&
> > + data->secure != object_class_is_secure(klass)) {
> > + return;
> > + }
> > +
> > info = g_malloc0(sizeof(*info));
> > info->name = g_strdup(object_class_get_name(klass));
> > info->has_abstract = info->abstract = object_class_is_abstract(klass);
> > + info->has_secure = info->secure = object_class_is_secure(klass);
>
> Why are you assigning to has_secure here? I thought that was just for the
> filter test above.
'data->has_secure/secure' is for the input parameter allowing the
QMP client to say whether the returned device list should be
filtered based on security status, or include everything (the
default).
'info->has_secure/secure' is for the return value reporting to the
client whether each device was secure/insecure.
>
> Call object_class_is_secure once.
>
>
> r~
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|