qemu/qom
Paolo Bonzini cbc94d9702 qom: use correct field name when getting/setting alias properties
Alias targets have a different name than the alias property itself
(e.g. a machine's pflash0 might be an alias of a property named 'drive').
When the target's getter or setter invokes the visitor, it will use
a different name than what the caller expects, and the visitor will
not be able to find it (or will consume erroneously).

The solution is for alias getters and setters to wrap the incoming
visitor, and forward the sole field that the target is expecting while
renaming it appropriately.

This bug has been there forever, but it was exposed after -M parsing
switched from QemuOptions and StringInputVisitor to keyval and
QObjectInputVisitor.  Before, the visitor ignored the name. Now, it
checks "drive" against what was passed on the command line and finds
that no such property exists.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/484
Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-23 18:17:17 +02:00
..
container.c qom/container: remove .instance_size initializer from container_info 2020-06-10 12:09:59 -04:00
meson.build qom: Move the creation of the library to the main meson.build 2020-10-12 11:50:20 -04:00
object.c qom: use correct field name when getting/setting alias properties 2021-07-23 18:17:17 +02:00
object_interfaces.c qom: export more functions for use with non-UserCreatable objects 2021-07-06 08:33:51 +02:00
qom-hmp-cmds.c qobject: Change qobject_to_json()'s value to GString 2020-12-19 10:38:43 +01:00
qom-qmp-cmds.c qom: Factor out user_creatable_process_cmdline() 2021-03-19 10:17:14 +01:00
qom-qobject.c error: Eliminate error_propagate() manually 2020-07-10 15:18:08 +02:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00