On Mon, Jan 09, 2023 at 11:54:16PM +0100, Philippe Mathieu-Daudé wrote: > Introduce object_class_property_deprecate() to register > a QOM property as deprecated. When this property's getter / > setter is called, a deprecation warning is displayed on the > monitor. > > Inspired-by: Daniel P. Berrange <berra...@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> > --- > include/qom/object.h | 17 +++++++++++++++++ > qom/object.c | 23 +++++++++++++++++++++++ > 2 files changed, 40 insertions(+) > > diff --git a/include/qom/object.h b/include/qom/object.h > index ef7258a5e1..b76724292c 100644 > --- a/include/qom/object.h > +++ b/include/qom/object.h > @@ -97,6 +97,7 @@ struct ObjectProperty > ObjectPropertyInit *init; > void *opaque; > QObject *defval; > + const char *deprecation_reason; > };
qapi/qom.list should change ObjectPropertyInfo type to include a 'deprecated': 'bool' field, as we've done for machine types and CPU models. Then qmp_qom_list should set this flag "deprecated = !!deprecation_reason" With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|