aboutsummaryrefslogtreecommitdiff
path: root/hw/isa-bus.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-02-05 14:34:48 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-02-12 09:43:41 +0000
commit86f4a9a5c7f1d98b73520ff9f396206ebc5ddb71 (patch)
treeda3eb734aec39f89a83edbfe4ae5dbd7e4759db4 /hw/isa-bus.c
parent91c9e09147ba1f3604a3d5d29b4de7702082a33f (diff)
isa: add creation function that may fail
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r--hw/isa-bus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 0cb1afbf2e..6f349a574a 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -146,6 +146,18 @@ ISADevice *isa_create(const char *name)
return DO_UPCAST(ISADevice, qdev, dev);
}
+ISADevice *isa_try_create(const char *name)
+{
+ DeviceState *dev;
+
+ if (!isabus) {
+ hw_error("Tried to create isa device %s with no isa bus present.",
+ name);
+ }
+ dev = qdev_try_create(&isabus->qbus, name);
+ return DO_UPCAST(ISADevice, qdev, dev);
+}
+
ISADevice *isa_create_simple(const char *name)
{
ISADevice *dev;