aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-02-05 14:56:53 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-02-20 09:31:57 +0000
commit7353153891a9bbdbaa1672c37208effb5a09d715 (patch)
tree22054411c7f1d5b8573d13ce03de0e50f241b326
parentdefdb20e1a8ac3a7200aaf190d7fb20a5ac8bcea (diff)
parallel: make optional
Ignore failure with parallel device creation. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--hw/pc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/pc.h b/hw/pc.h
index 443ba34d16..f823b7d25a 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -24,7 +24,10 @@ static inline bool parallel_init(int index, CharDriverState *chr)
{
ISADevice *dev;
- dev = isa_create("isa-parallel");
+ dev = isa_try_create("isa-parallel");
+ 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) {