• M
    chardev: qom-ify · 777357d7
    Marc-André Lureau 提交于
    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: NMarc-André Lureau <marcandre.lureau@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    777357d7
monitor.c 110.7 KB