@@ -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 */
Signed-off-by: Nathan Baum <nathan@parenthephobia.org.uk> --- hw/isa-bus.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)