Signed-off-by: Nathan Baum <nat...@parenthephobia.org.uk> --- hw/isa-bus.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/hw/isa-bus.c b/hw/isa-bus.c index 4d489d2..b3d599f 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -21,6 +21,8 @@ #include "monitor.h" #include "sysbus.h" #include "isa.h" +#include "qjson.h" +#include "qint.h" struct ISABus { BusState qbus; @@ -143,6 +145,21 @@ static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent) } } +static QObject *isabus_dev_info(Monitor *mon, DeviceState *dev) +{ + ISADevice *d = DO_UPCAST(ISADevice, qdev, dev); + + if (d->isairq[1] != -1) { + return qobject_from_jsonf("{'irq':[%d,%d]}", + d->isairq[0], d->isairq[1]); + } else if (d->isairq[0] != -1) { + return qobject_from_jsonf("{'irq':[%d]}", + d->isairq[0]); + } else { + return qobject_from_jsonf("{'irq':[]}"); + } +} + static int isabus_bridge_init(SysBusDevice *dev) { /* nothing */ -- 1.6.3.3