parallel: make optional

Ignore failure with parallel device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2011-02-05 14:56:53 +00:00
parent defdb20e1a
commit 7353153891
1 changed files with 4 additions and 1 deletions

View File

@ -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) {