chardev: add braille support to qapi
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 <kraxel@redhat.com>
This commit is contained in:
parent
f5a51cab2a
commit
2d57286da6
@ -561,7 +561,7 @@ static void baum_close(struct CharDriverState *chr)
|
|||||||
g_free(baum);
|
g_free(baum);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CharDriverState *chr_baum_init(QemuOpts *opts)
|
CharDriverState *chr_baum_init(void)
|
||||||
{
|
{
|
||||||
BaumDriverState *baum;
|
BaumDriverState *baum;
|
||||||
CharDriverState *chr;
|
CharDriverState *chr;
|
||||||
@ -627,7 +627,7 @@ fail_handle:
|
|||||||
|
|
||||||
static void register_types(void)
|
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);
|
type_init(register_types);
|
||||||
|
@ -264,4 +264,7 @@ CharDriverState *qemu_char_get_next_serial(void);
|
|||||||
/* msmouse */
|
/* msmouse */
|
||||||
CharDriverState *qemu_chr_open_msmouse(void);
|
CharDriverState *qemu_chr_open_msmouse(void);
|
||||||
|
|
||||||
|
/* baum.c */
|
||||||
|
CharDriverState *chr_baum_init(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3211,7 +3211,8 @@
|
|||||||
'pty' : 'ChardevDummy',
|
'pty' : 'ChardevDummy',
|
||||||
'null' : 'ChardevDummy',
|
'null' : 'ChardevDummy',
|
||||||
'mux' : 'ChardevMux',
|
'mux' : 'ChardevMux',
|
||||||
'msmouse': 'ChardevDummy' } }
|
'msmouse': 'ChardevDummy',
|
||||||
|
'braille': 'ChardevDummy' } }
|
||||||
|
|
||||||
##
|
##
|
||||||
# @ChardevReturn:
|
# @ChardevReturn:
|
||||||
|
@ -3722,6 +3722,11 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,
|
|||||||
case CHARDEV_BACKEND_KIND_MSMOUSE:
|
case CHARDEV_BACKEND_KIND_MSMOUSE:
|
||||||
chr = qemu_chr_open_msmouse();
|
chr = qemu_chr_open_msmouse();
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_BRLAPI
|
||||||
|
case CHARDEV_BACKEND_KIND_BRAILLE:
|
||||||
|
chr = chr_baum_init();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
error_setg(errp, "unknown chardev backend (%d)", backend->kind);
|
error_setg(errp, "unknown chardev backend (%d)", backend->kind);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user