diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-02-05 21:30:42 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-02-20 09:33:03 +0000 |
commit | 9b13ef9f4c5be62bf405ab4291e090631089707f (patch) | |
tree | 3845b95cb879568c29bdd75ab3c4d5415ae2050b /hw | |
parent | e22cf21efdc5f25fb9ba136cba7acb71aa379ea7 (diff) | |
download | qemu-9b13ef9f4c5be62bf405ab4291e090631089707f.zip qemu-9b13ef9f4c5be62bf405ab4291e090631089707f.tar.gz qemu-9b13ef9f4c5be62bf405ab4291e090631089707f.tar.bz2 |
serial: make optional
Ignore failure with serial device creation.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pc.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -21,7 +21,10 @@ static inline bool serial_isa_init(int index, CharDriverState *chr) { 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_chr(&dev->qdev, "chardev", chr); if (qdev_init(&dev->qdev) < 0) { |