Here is version 2 of the device_show patch series. It currently has some dependencies on recently posted doc changes / enhancements, namely: - http://thread.gmane.org/gmane.comp.emulators.qemu/70673 ([PATCH v3 0/3]: QMP: Commands doc) - http://thread.gmane.org/gmane.comp.emulators.qemu/70756 ([PATCH 1/7] QMP: Add "Downstream extension of QMP" to spec)
Major changes in v2 are: - command line completion for device tree paths - introduced complex object classes ("__class__") and applied that on buffers - documentation - applied new qdev path specification also on device_del - proper qdev device/bus sorting via QTAILQ (instead of QLIST_INSERT_TAIL) - added QERR_DEVICE_NO_STATE - fixed various bugs - <things I forgot> For reference, the series is also available at git://git.kiszka.org/qemu.git queues/device-show Thanks for all comments so far! Jan Kiszka (15): Add dependency of JSON unit tests on config-host.h qdev: Fix scanning across single-bus devices qdev: Allow device addressing via 'driver.instance' qdev: Convert device and bus lists to QTAILQ qdev: Allow device specification by qtree path for device_del qdev: Push QMP mode checks into qbus_list_bus/dev monitor: Add completion for qdev paths Add base64 encoder/decoder QMP: Reserve namespace for complex object classes Add QBuffer monitor: return length of printed string via monitor_[v]printf monitor: Add basic device state visualization QMP: Teach basic capability negotiation to python example QMP: Fix python helper /wrt long return strings QMP: Add support for buffer class to qmp python helper Makefile | 5 +- Makefile.objs | 4 +- QMP/qmp-shell | 1 + QMP/qmp-spec.txt | 24 +++- QMP/qmp.py | 29 +++- QMP/vm-info | 1 + base64.c | 202 +++++++++++++++++++++++ base64.h | 18 ++ check-qbuffer.c | 172 +++++++++++++++++++ configure | 2 +- docs/qdev-device-use.txt | 16 ++- hw/acpi_piix4.c | 2 +- hw/hw.h | 2 + hw/i2c.c | 2 +- hw/pci-hotplug.c | 2 +- hw/qdev.c | 408 +++++++++++++++++++++++++++++++++++++++++----- hw/qdev.h | 12 +- hw/ssi.c | 6 +- monitor.c | 108 +++++++++++- monitor.h | 4 +- qbuffer.c | 116 +++++++++++++ qbuffer.h | 33 ++++ qemu-monitor.hx | 74 ++++++++- qemu-tool.c | 6 +- qerror.c | 4 + qerror.h | 3 + qjson.c | 15 ++ qobject.h | 1 + 28 files changed, 1193 insertions(+), 79 deletions(-) create mode 100644 base64.c create mode 100644 base64.h create mode 100644 check-qbuffer.c create mode 100644 qbuffer.c create mode 100644 qbuffer.h