qemu/qom
Markus Armbruster 1bf4d3294b monitor: Fix find_device_state() for IDs containing slashes
Recent commit 6952026120 "monitor: Tidy up find_device_state()"
assumed the function's argument is "the device's ID or QOM path" (as
documented for device_del).  It's actually either an absolute QOM
path, or a QOM path relative to /machine/peripheral/.  Such a relative
path is a device ID when it doesn't contain a slash.  When it does,
the function now always fails.  Broke iotest 200, which uses relative
path "vda/virtio-backend".

It fails because object_resolve_path_component() resolves just one
component, not a relative path.

The obvious function to resolve relative paths is
object_resolve_path().  It picks a parent automatically.  Too much
magic, we want to specify the parent.  Create new
object_resolve_path_at() for that, and use it in find_device_state().

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20211019085711.86377-1-armbru@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-10 06:14:51 +01:00
..
container.c
meson.build qom: Move the creation of the library to the main meson.build 2020-10-12 11:50:20 -04:00
object_interfaces.c qom: Reduce use of error_propagate() 2021-10-15 16:06:11 +02:00
object.c monitor: Fix find_device_state() for IDs containing slashes 2021-11-10 06:14:51 +01: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
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h