[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC, PATCH 11/11] Change the monitor to use the new do_inf
From: |
Nathan Baum |
Subject: |
[Qemu-devel] [RFC, PATCH 11/11] Change the monitor to use the new do_info_qtree. |
Date: |
Sat, 26 Dec 2009 21:11:39 +0000 |
Signed-off-by: Nathan Baum <address@hidden>
---
hw/qdev.c | 9 ++++++++-
hw/qdev.h | 3 ++-
monitor.c | 3 ++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index f5d68c6..d9d3778 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -727,6 +727,12 @@ static void do_info_qbus(Monitor *mon, BusState *bus,
QObject **ret_data)
*ret_data = (QObject *) qdict;
}
+void do_info_qtree(Monitor *mon, QObject **ret_data)
+{
+ if (main_system_bus)
+ do_info_qbus(mon, main_system_bus, ret_data);
+}
+
#define qdev_printf(fmt, ...) monitor_printf(mon, "%*s" fmt, indent, "", ##
__VA_ARGS__)
static void qbus_print(Monitor *mon, BusState *bus, int indent);
@@ -780,8 +786,9 @@ static void qbus_print(Monitor *mon, BusState *bus, int
indent)
}
#undef qdev_printf
-void do_info_qtree(Monitor *mon)
+void do_info_qtree_print(Monitor *mon, const QObject *data)
{
+ // TODO: Display qtree from the data!
if (main_system_bus)
qbus_print(mon, main_system_bus, 0);
}
diff --git a/hw/qdev.h b/hw/qdev.h
index 93467a5..aad4f75 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -168,7 +168,8 @@ void qbus_free(BusState *bus);
/*** monitor commands ***/
-void do_info_qtree(Monitor *mon);
+void do_info_qtree(Monitor *mon, QObject **ret_data);
+void do_info_qtree_print(Monitor *mon, const QObject *data);
void do_info_qdm(Monitor *mon);
void do_device_add(Monitor *mon, const QDict *qdict);
void do_device_del(Monitor *mon, const QDict *qdict);
diff --git a/monitor.c b/monitor.c
index e6b5424..8d5b650 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2607,7 +2607,8 @@ static const mon_cmd_t info_cmds[] = {
.args_type = "",
.params = "",
.help = "show device tree",
- .mhandler.info = do_info_qtree,
+ .user_print = do_info_qtree_print,
+ .mhandler.info_new = do_info_qtree,
},
{
.name = "qdm",
--
1.6.3.3
- Re: [Qemu-devel] [PATCH 11/11] Change the monitor to use the new do_info_qtree., (continued)
[Qemu-devel] [PATCH 09/11] qdev: Add usb_bus_dev_info to usb_bus_info., Nathan Baum, 2009/12/26
Re: [Qemu-devel] [RFC,PATCH 00/11] Half-convert info qtree to QMP., Luiz Capitulino, 2009/12/29
[Qemu-devel] [RFC,PATCH 00/11] Half-convert info qtree to QMP., Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC, PATCH 02/11] qdev: isabus_dev_info returns a QObject detailing the IRQ lines used by the device., Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC, PATCH 05/11] qdev: Add pcibus_dev_info to pci_bus_info, Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC,PATCH 04/11] qdev: pcibus_dev_info, Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC,PATCH 10/11] qdev: Add do_info_qbus and friends., Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC,PATCH 08/11] qdev: Add usb_bus_dev_info, Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC, PATCH 11/11] Change the monitor to use the new do_info_qtree.,
Nathan Baum <=
- [Qemu-devel] [RFC, PATCH 03/11] qdev: Add isabuf_dev_info to ISA's BusInfo struct., Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC, PATCH 09/11] qdev: Add usb_bus_dev_info to usb_bus_info., Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC,PATCH 06/11] qdev: sysbus_dev_info, Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC, PATCH 01/11] Add info_dev function pointer for BusInfo., Nathan Baum, 2009/12/26
- [Qemu-devel] [RFC, PATCH 07/11] qdev: Add sysbus_dev_info to system_bus_info, Nathan Baum, 2009/12/26
- Re: [Qemu-devel] [RFC,PATCH 00/11] Half-convert info qtree to QMP., Nathan Baum, 2009/12/26