mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
qdev: add a qdev_get_type() function and expose as a 'type' property
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
6a146eba33
commit
cd34d667d4
2 changed files with 21 additions and 0 deletions
14
hw/qdev.h
14
hw/qdev.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue