[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/17] chardev: add braille support to qapi
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 05/17] chardev: add braille support to qapi |
Date: |
Thu, 28 Feb 2013 08:49:57 +0100 |
This patch adds 'braille' support to qapi and also switches over
the braille chardev initialization to the new qapi code path.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/baum.c | 2 +-
hw/baum.h | 2 +-
qapi-schema.json | 3 ++-
qemu-char.c | 9 ++++++---
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/hw/baum.c b/hw/baum.c
index 09dcb9c..7f0384c 100644
--- a/hw/baum.c
+++ b/hw/baum.c
@@ -562,7 +562,7 @@ static void baum_close(struct CharDriverState *chr)
g_free(baum);
}
-CharDriverState *chr_baum_init(QemuOpts *opts)
+CharDriverState *chr_baum_init(void)
{
BaumDriverState *baum;
CharDriverState *chr;
diff --git a/hw/baum.h b/hw/baum.h
index 7635884..6fcb627 100644
--- a/hw/baum.h
+++ b/hw/baum.h
@@ -25,6 +25,6 @@
#define HW_BAUM_H 1
/* char device */
-CharDriverState *chr_baum_init(QemuOpts *opts);
+CharDriverState *chr_baum_init(void);
#endif
diff --git a/qapi-schema.json b/qapi-schema.json
index b14c5c7..5dcfbfe 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3211,7 +3211,8 @@
'pty' : 'ChardevDummy',
'null' : 'ChardevDummy',
'mux' : 'ChardevMux',
- 'msmouse': 'ChardevDummy' } }
+ 'msmouse': 'ChardevDummy',
+ 'braille': 'ChardevDummy' } }
##
# @ChardevReturn:
diff --git a/qemu-char.c b/qemu-char.c
index c824ed8..5dc391d 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2997,9 +2997,7 @@ static const struct {
{ .name = "pipe", .open = qemu_chr_open_pipe },
{ .name = "stdio", .open = qemu_chr_open_stdio },
#endif
-#ifdef CONFIG_BRLAPI
- { .name = "braille", .open = chr_baum_init },
-#endif
+ { .name = "braille", .kind = CHARDEV_BACKEND_KIND_BRAILLE },
#ifdef HAVE_CHARDEV_TTY
{ .name = "tty", .open = qemu_chr_open_tty },
{ .name = "serial", .open = qemu_chr_open_tty },
@@ -3480,6 +3478,11 @@ ChardevReturn *qmp_chardev_add(const char *id,
ChardevBackend *backend,
case CHARDEV_BACKEND_KIND_MSMOUSE:
chr = qemu_chr_open_msmouse();
break;
+#ifdef CONFIG_BRLAPI
+ case CHARDEV_BACKEND_KIND_BRAILLE:
+ chr = chr_baum_init();
+ break;
+#endif
default:
error_setg(errp, "unknown chardev backend (%d)", backend->kind);
break;
--
1.7.9.7
- [Qemu-devel] [PATCH 00/17] chardev: qapi conversion continued, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 03/17] chardev: switch null init to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 05/17] chardev: add braille support to qapi,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 07/17] chardev: add stdio support to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 08/17] chardev: switch serial/tty init to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 15/17] chardev: add memory (ringbuf) support to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 16/17] chardev: add udp support to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 01/17] chardev: add support for qapi-based chardev initialization, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 17/17] Revert "hmp: Disable chardev-add and chardev-remove", Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 12/17] chardev: add pipe support to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 14/17] chardev: add vc support to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 11/17] chardev: add console support to qapi, Gerd Hoffmann, 2013/02/28
- [Qemu-devel] [PATCH 13/17] chardev: add spice support to qapi, Gerd Hoffmann, 2013/02/28