diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-09 10:51:49 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-03 10:41:04 -0600 |
commit | 4be9f0d11cf2dbb1eb3f55b33c87d6df3aa7d578 (patch) | |
tree | 63f72eaf204e81336e4ab4341a10eaf6147c5f68 /hw/qdev.h | |
parent | ba02430f1a681173cff5336c626d6edc5ea268db (diff) |
qdev: make DeviceInfo private
Introduce accessors and remove any code that directly accesses DeviceInfo
members.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r-- | hw/qdev.h | 24 |
1 files changed, 9 insertions, 15 deletions
@@ -405,22 +405,8 @@ void qdev_prop_set_globals(DeviceState *dev); void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev, Property *prop, const char *value); -DeviceInfo *qdev_get_info(DeviceState *dev); - -static inline const char *qdev_fw_name(DeviceState *dev) -{ - DeviceInfo *info = qdev_get_info(dev); - - if (info->fw_name) { - return info->fw_name; - } else if (info->alias) { - return info->alias; - } - - return object_get_typename(OBJECT(dev)); -} - char *qdev_get_fw_dev_path(DeviceState *dev); + /* This is a nasty hack to allow passing a NULL bus to qdev_create. */ extern struct BusInfo system_bus_info; @@ -668,4 +654,12 @@ void qdev_machine_init(void); */ void device_reset(DeviceState *dev); +const VMStateDescription *qdev_get_vmsd(DeviceState *dev); + +const char *qdev_fw_name(DeviceState *dev); + +BusInfo *qdev_get_bus_info(DeviceState *dev); + +Property *qdev_get_props(DeviceState *dev); + #endif |