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 <[email protected]>
g_free(baum);
}
-static CharDriverState *chr_baum_init(QemuOpts *opts)
+CharDriverState *chr_baum_init(void)
{
BaumDriverState *baum;
CharDriverState *chr;
static void register_types(void)
{
- register_char_driver("braille", chr_baum_init);
+ register_char_driver_qapi("braille", CHARDEV_BACKEND_KIND_BRAILLE, NULL);
}
type_init(register_types);
/* msmouse */
CharDriverState *qemu_chr_open_msmouse(void);
+/* baum.c */
+CharDriverState *chr_baum_init(void);
+
#endif
'pty' : 'ChardevDummy',
'null' : 'ChardevDummy',
'mux' : 'ChardevMux',
- 'msmouse': 'ChardevDummy' } }
+ 'msmouse': 'ChardevDummy',
+ 'braille': 'ChardevDummy' } }
##
# @ChardevReturn:
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;