diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-12 14:29:43 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-15 09:20:49 -0600 |
commit | cd34d667d448bec91c81f4e46f9e7eb4e4857f6f (patch) | |
tree | 2c09ce02e084d5555942d8d21ca59de386dd1847 /hw/qdev.h | |
parent | 6a146eba33159cb97d28457d409d81066cbefb09 (diff) |
qdev: add a qdev_get_type() function and expose as a 'type' property
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r-- | hw/qdev.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -596,4 +596,18 @@ void qdev_property_add_str(DeviceState *dev, const char *name, void (*set)(DeviceState *, const char *, Error **), Error **errp); +/** + * @qdev_get_type + * + * Returns the string representation of the type of this object. + * + * @dev - the device + * + * @errp - if an error occurs, a pointer to an area to store the error + * + * Returns: a string representing the type. This must be freed by the caller + * with g_free(). + */ +char *qdev_get_type(DeviceState *dev, Error **errp); + #endif |