• Peter Maydell's avatar
    chardev/char-fe: Allow NULL chardev in qemu_chr_fe_init() · 12051d82
    Peter Maydell authored
    All the functions in char-fe.c handle the CharBackend
    having a NULL Chardev pointer, which means that the
    backend exists but is not connected to anything. The
    exception is qemu_chr_fe_init(), which will crash if
    passed a NULL Chardev pointer argument. This can happen
    for various boards if they're started with 'nodefaults':
     arm-softmmu/qemu-system-arm -S -nodefaults -M cubieboard
     riscv32-softmmu/qemu-system-riscv32 -nodefaults -M sifive_e
    
    Make qemu_chr_fe_init() accept a NULL chardev. This allows
    UART models to handle NULL chardev properties without
    generally needing to special case them or to manually
    create a NullChardev.
    Reported-by: 's avatarThomas Huth <thuth@redhat.com>
    Signed-off-by: 's avatarPeter Maydell <peter.maydell@linaro.org>
    Message-Id: <20180323152948.27048-1-peter.maydell@linaro.org>
    Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
    12051d82
Name
Last commit
Last update
..
Makefile.objs Loading commit data...
baum.c Loading commit data...
char-console.c Loading commit data...
char-fd.c Loading commit data...
char-fe.c Loading commit data...
char-file.c Loading commit data...
char-io.c Loading commit data...
char-mux.c Loading commit data...
char-null.c Loading commit data...
char-parallel.c Loading commit data...
char-pipe.c Loading commit data...
char-pty.c Loading commit data...
char-ringbuf.c Loading commit data...
char-serial.c Loading commit data...
char-socket.c Loading commit data...
char-stdio.c Loading commit data...
char-udp.c Loading commit data...
char-win-stdio.c Loading commit data...
char-win.c Loading commit data...
char.c Loading commit data...
msmouse.c Loading commit data...
spice.c Loading commit data...
testdev.c Loading commit data...
trace-events Loading commit data...
wctablet.c Loading commit data...