mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
char: remove explicit_be_open from CharDriverState
It's only used in qmp_chardev_add(), so use a create() argument instead. Also switched to typedef functions for CharDriverParse/CharDriverCreate. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022100951.19562-7-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ebf4c54d4b
commit
82878dac6f
8 changed files with 59 additions and 32 deletions
11
ui/console.c
11
ui/console.c
|
@ -2079,10 +2079,6 @@ static CharDriverState *text_console_init(ChardevVC *vc, Error **errp)
|
|||
s->chr = chr;
|
||||
chr->opaque = s;
|
||||
chr->chr_set_echo = text_console_set_echo;
|
||||
/* console/chardev init sometimes completes elsewhere in a 2nd
|
||||
* stage, so defer OPENED events until they are fully initialized
|
||||
*/
|
||||
chr->explicit_be_open = true;
|
||||
|
||||
if (display_state) {
|
||||
text_console_do_init(chr, display_state);
|
||||
|
@ -2093,8 +2089,13 @@ static CharDriverState *text_console_init(ChardevVC *vc, Error **errp)
|
|||
static VcHandler *vc_handler = text_console_init;
|
||||
|
||||
static CharDriverState *vc_init(const char *id, ChardevBackend *backend,
|
||||
ChardevReturn *ret, Error **errp)
|
||||
ChardevReturn *ret, bool *be_opened,
|
||||
Error **errp)
|
||||
{
|
||||
/* console/chardev init sometimes completes elsewhere in a 2nd
|
||||
* stage, so defer OPENED events until they are fully initialized
|
||||
*/
|
||||
*be_opened = false;
|
||||
return vc_handler(backend->u.vc.data, errp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue