OSDN Git Service

hw/char/serial: Allow disconnected chardevs
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 20 Apr 2018 14:52:37 +0000 (15:52 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Apr 2018 12:57:00 +0000 (13:57 +0100)
commit47c4f85a0c27888e12af827471cfef87deb49821
treea780f1f3df4a7f409bf197df4410d8a19ae86cae
parent20b2323edf8d42fe024902ca7d847b9f71c98df1
hw/char/serial: Allow disconnected chardevs

Currently the serial.c realize code has an explicit check that it is not
connected to a disconnected backend (ie one with a NULL chardev).
This isn't what we want -- you should be able to create a serial device
even if it isn't attached to anything. Remove the check.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-id: 20180420145249.32435-2-peter.maydell@linaro.org
hw/char/serial.c