qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 05/20] qdev/core: add monitor command to list all dr


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 05/20] qdev/core: add monitor command to list all drivers
Date: Mon, 29 Jun 2009 14:46:06 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 hw/qdev.c |   10 ++++++++++
 hw/qdev.h |    1 +
 monitor.c |    2 ++
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/hw/qdev.c b/hw/qdev.c
index 1fb73b1..768431c 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -419,3 +419,13 @@ void do_info_qbus(Monitor *mon)
                        bus->parent ? bus->parent->info->name : "<none>");
     }
 }
+
+void do_info_qdrv(Monitor *mon)
+{
+    DeviceInfo *info;
+
+    for (info = device_info_list; info != NULL; info = info->next) {
+        monitor_printf(mon, "name \"%s\", bus %s\n",
+                       info->name, info->bus_info->name);
+    }
+}
diff --git a/hw/qdev.h b/hw/qdev.h
index c4b04c1..2f4e4a4 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -128,5 +128,6 @@ BusState *qbus_find(const char *type, const char *name, int 
busnr);
 
 void do_info_qtree(Monitor *mon);
 void do_info_qbus(Monitor *mon);
+void do_info_qdrv(Monitor *mon);
 
 #endif
diff --git a/monitor.c b/monitor.c
index b1da695..b91fef6 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1743,6 +1743,8 @@ static const mon_cmd_t info_cmds[] = {
       "", "show device tree" },
     { "qbus", "", do_info_qbus,
       "", "show qdev bus list" },
+    { "qdrv", "", do_info_qdrv,
+      "", "show qdev driver list" },
     { NULL, NULL, },
 };
 
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]