[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/5] console: Hook QemuConsoles into qom tree
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 2/5] console: Hook QemuConsoles into qom tree |
Date: |
Thu, 18 Apr 2013 11:01:16 +0200 |
Put them named "console[$index]" below "/backend", so you can
list & inspect them via QMP.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/console.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/ui/console.c b/ui/console.c
index e9f3080..b92bde3 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1541,6 +1541,8 @@ static DisplayState *get_alloc_displaystate(void)
*/
DisplayState *init_displaystate(void)
{
+ Error *local_err = NULL;
+ gchar *name;
int i;
if (!display_state) {
@@ -1552,6 +1554,14 @@ DisplayState *init_displaystate(void)
consoles[i]->ds == NULL) {
text_console_do_init(consoles[i]->chr, display_state);
}
+
+ /* Hook up into the qom tree here (not in new_console()), once
+ * all QemuConsoles are created and the order / numbering
+ * doesn't change any more */
+ name = g_strdup_printf("console[%d]", i);
+ object_property_add_child(container_get(object_get_root(), "/backend"),
+ name, OBJECT(consoles[i]), &local_err);
+ g_free(name);
}
return display_state;
--
1.7.9.7
- [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Gerd Hoffmann, 2013/04/18
- [Qemu-devel] [PATCH 2/5] console: Hook QemuConsoles into qom tree,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 4/5] console: add qemu_console_lookup_by_device, Gerd Hoffmann, 2013/04/18
- [Qemu-devel] [PATCH 1/5] console: qom-ify QemuConsole, Gerd Hoffmann, 2013/04/18
- [Qemu-devel] [PATCH 5/5] console: extend screendump monitor cmd, Gerd Hoffmann, 2013/04/18
- [Qemu-devel] [PATCH 3/5] console: add device link to QemuConsoles, Gerd Hoffmann, 2013/04/18
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Eric Blake, 2013/04/18
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Markus Armbruster, 2013/04/19