mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-09 06:36:08 +00:00
serial: make optional
Ignore failure with serial device creation. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
e22cf21efd
commit
9b13ef9f4c
5
hw/pc.h
5
hw/pc.h
@ -21,7 +21,10 @@ static inline bool serial_isa_init(int index, CharDriverState *chr)
|
|||||||
{
|
{
|
||||||
ISADevice *dev;
|
ISADevice *dev;
|
||||||
|
|
||||||
dev = isa_create("isa-serial");
|
dev = isa_try_create("isa-serial");
|
||||||
|
if (!dev) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
qdev_prop_set_uint32(&dev->qdev, "index", index);
|
qdev_prop_set_uint32(&dev->qdev, "index", index);
|
||||||
qdev_prop_set_chr(&dev->qdev, "chardev", chr);
|
qdev_prop_set_chr(&dev->qdev, "chardev", chr);
|
||||||
if (qdev_init(&dev->qdev) < 0) {
|
if (qdev_init(&dev->qdev) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user