mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qemu-char: add create to register_char_driver
Having creation as a member of the CharDriver struct removes the need to export functions for qemu-char.c's usage. After the conversion, chardev backends implemented outside qemu-char.c will not need a stub creation function anymore. Ultimately all drivers will be converted. For now, support the case where cd->create == NULL. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d809ab9521
commit
4ca172817a
7 changed files with 142 additions and 109 deletions
|
@ -629,7 +629,8 @@ fail_handle:
|
|||
|
||||
static void register_types(void)
|
||||
{
|
||||
register_char_driver("braille", CHARDEV_BACKEND_KIND_BRAILLE, NULL);
|
||||
register_char_driver("braille", CHARDEV_BACKEND_KIND_BRAILLE, NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
type_init(register_types);
|
||||
|
|
|
@ -79,7 +79,8 @@ CharDriverState *qemu_chr_open_msmouse(void)
|
|||
|
||||
static void register_types(void)
|
||||
{
|
||||
register_char_driver("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL);
|
||||
register_char_driver("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
type_init(register_types);
|
||||
|
|
|
@ -125,7 +125,8 @@ CharDriverState *chr_testdev_init(void)
|
|||
|
||||
static void register_types(void)
|
||||
{
|
||||
register_char_driver("testdev", CHARDEV_BACKEND_KIND_TESTDEV, NULL);
|
||||
register_char_driver("testdev", CHARDEV_BACKEND_KIND_TESTDEV, NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
type_init(register_types);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue