aboutsummaryrefslogtreecommitdiff
path: root/hw/sysbus.h
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-02-05 14:34:56 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-02-12 09:45:03 +0000
commit4912371fc39120fb7eb1a6b3f270fab30d05a7b6 (patch)
treee4afd92efce18ebbbae098459dde8288117312a4 /hw/sysbus.h
parent86d864140bc597dce0fedf8547f4d615a920c444 (diff)
sysbus: add creation function that may fail
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sysbus.h')
-rw-r--r--hw/sysbus.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/sysbus.h b/hw/sysbus.h
index e9eb618a72..4e8cb16d42 100644
--- a/hw/sysbus.h
+++ b/hw/sysbus.h
@@ -57,6 +57,8 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, target_phys_addr_t addr);
/* Legacy helper function for creating devices. */
DeviceState *sysbus_create_varargs(const char *name,
target_phys_addr_t addr, ...);
+DeviceState *sysbus_try_create_varargs(const char *name,
+ target_phys_addr_t addr, ...);
static inline DeviceState *sysbus_create_simple(const char *name,
target_phys_addr_t addr,
qemu_irq irq)
@@ -64,4 +66,11 @@ static inline DeviceState *sysbus_create_simple(const char *name,
return sysbus_create_varargs(name, addr, irq, NULL);
}
+static inline DeviceState *sysbus_try_create_simple(const char *name,
+ target_phys_addr_t addr,
+ qemu_irq irq)
+{
+ return sysbus_try_create_varargs(name, addr, irq, NULL);
+}
+
#endif /* !HW_SYSBUS_H */