diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/qdev-core.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 178fee2ef6..48a96d28ff 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -368,4 +368,9 @@ static inline void qbus_set_hotplug_handler(BusState *bus, DeviceState *handler, QDEV_HOTPLUG_HANDLER_PROPERTY, errp); bus->allow_hotplug = 1; } + +static inline bool qbus_is_hotpluggable(BusState *bus) +{ + return bus->allow_hotplug || bus->hotplug_handler; +} #endif |