qemu-char: convert msmouse backend to data-driven creation

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2015-09-29 15:29:15 +02:00
parent 3c0e5a4a84
commit 96d885b93b
5 changed files with 6 additions and 14 deletions

View File

@ -63,7 +63,10 @@ static void msmouse_chr_close (struct CharDriverState *chr)
g_free (chr);
}
CharDriverState *qemu_chr_open_msmouse(void)
static CharDriverState *qemu_chr_open_msmouse(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
CharDriverState *chr;
@ -80,7 +83,7 @@ CharDriverState *qemu_chr_open_msmouse(void)
static void register_types(void)
{
register_char_driver("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL,
NULL);
qemu_chr_open_msmouse);
}
type_init(register_types);

View File

@ -356,9 +356,6 @@ extern int term_escape_char;
CharDriverState *qemu_char_get_next_serial(void);
/* msmouse */
CharDriverState *qemu_chr_open_msmouse(void);
/* testdev.c */
CharDriverState *chr_testdev_init(void);

View File

@ -4312,7 +4312,7 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,
abort();
break;
case CHARDEV_BACKEND_KIND_MSMOUSE:
chr = qemu_chr_open_msmouse();
abort();
break;
#ifdef CONFIG_BRLAPI
case CHARDEV_BACKEND_KIND_BRAILLE:

View File

@ -1,7 +1,6 @@
stub-obj-y += arch-query-cpu-def.o
stub-obj-y += bdrv-commit-all.o
stub-obj-y += chr-baum-init.o
stub-obj-y += chr-msmouse.o
stub-obj-y += chr-testdev.o
stub-obj-y += clock-warp.o
stub-obj-y += cpu-get-clock.o

View File

@ -1,7 +0,0 @@
#include "qemu-common.h"
#include "sysemu/char.h"
CharDriverState *qemu_chr_open_msmouse(void)
{
return 0;
}