diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-12-07 18:39:10 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-01-27 18:08:00 +0100 |
commit | 777357d758d937c9dd83082c39aff9f1e53e9ba3 (patch) | |
tree | 20b236bf5acc7dfc20b4358bb8072dfe983c0e2d /vl.c | |
parent | 5bf5adaeb7245d7037f29429fb231b4b602d5b50 (diff) |
chardev: qom-ify
Turn Chardev into Object.
qemu_chr_alloc() is replaced by the qemu_chardev_new() constructor. It
will call qemu_char_open() to open/intialize the chardev with the
ChardevCommon *backend settings.
The CharDriver::create() callback is turned into a ChardevClass::open()
which is called from the newly introduced qemu_chardev_open().
"chardev-gdb" and "chardev-hci" are internal chardev and aren't
creatable directly with -chardev. Use a new internal flag to disable
them. We may want to use TYPE_USER_CREATABLE interface instead, or
perhaps allow -chardev usage.
Although in general we keep typename and macros private, unless the type
is being used by some other file, in this patch, all types and common
helper macros for qemu-char.c are in char.h. This is to help transition
now (some types must be declared early, while some aren't shared) and
when splitting in several units. This is to be improved later.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4252,6 +4252,8 @@ int main(int argc, char **argv, char **envp) sdl_display_early_init(request_opengl); } + qemu_console_early_init(); + if (request_opengl == 1 && display_opengl == 0) { #if defined(CONFIG_OPENGL) error_report("OpenGL is not supported by the display"); |