chardev: add msmouse support to qapi
This patch adds 'msmouse' support to qapi and also switches over the msmouse chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
80dca9e643
commit
f5a51cab2a
@ -63,7 +63,7 @@ static void msmouse_chr_close (struct CharDriverState *chr)
|
|||||||
g_free (chr);
|
g_free (chr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
|
CharDriverState *qemu_chr_open_msmouse(void)
|
||||||
{
|
{
|
||||||
CharDriverState *chr;
|
CharDriverState *chr;
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ static CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
|
|||||||
|
|
||||||
static void register_types(void)
|
static void register_types(void)
|
||||||
{
|
{
|
||||||
register_char_driver("msmouse", qemu_chr_open_msmouse);
|
register_char_driver_qapi("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
type_init(register_types);
|
type_init(register_types);
|
||||||
|
@ -261,4 +261,7 @@ size_t qemu_chr_mem_osize(const CharDriverState *chr);
|
|||||||
|
|
||||||
CharDriverState *qemu_char_get_next_serial(void);
|
CharDriverState *qemu_char_get_next_serial(void);
|
||||||
|
|
||||||
|
/* msmouse */
|
||||||
|
CharDriverState *qemu_chr_open_msmouse(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3210,7 +3210,8 @@
|
|||||||
'socket' : 'ChardevSocket',
|
'socket' : 'ChardevSocket',
|
||||||
'pty' : 'ChardevDummy',
|
'pty' : 'ChardevDummy',
|
||||||
'null' : 'ChardevDummy',
|
'null' : 'ChardevDummy',
|
||||||
'mux' : 'ChardevMux' } }
|
'mux' : 'ChardevMux',
|
||||||
|
'msmouse': 'ChardevDummy' } }
|
||||||
|
|
||||||
##
|
##
|
||||||
# @ChardevReturn:
|
# @ChardevReturn:
|
||||||
|
@ -3719,6 +3719,9 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,
|
|||||||
}
|
}
|
||||||
chr = qemu_chr_open_mux(base);
|
chr = qemu_chr_open_mux(base);
|
||||||
break;
|
break;
|
||||||
|
case CHARDEV_BACKEND_KIND_MSMOUSE:
|
||||||
|
chr = qemu_chr_open_msmouse();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
error_setg(errp, "unknown chardev backend (%d)", backend->kind);
|
error_setg(errp, "unknown chardev backend (%d)", backend->kind);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user