qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 06/10] serial: make optional
@ 2011-02-12 22:42 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2011-02-12 22:42 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

Ignore failure with serial device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/pc.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/pc.h b/hw/pc.h
index 09f63f0..89b43ea 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -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) {
-- 
1.6.2.4

[-- Attachment #2: 0006-serial-make-optional.patch --]
[-- Type: application/mbox, Size: 1124 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-12 22:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-12 22:42 [Qemu-devel] [PATCH 06/10] serial: make optional Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).