mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
qdev: make compat stuff more generic
This patch renames the compat properties into global properties and makes them more generic. The compatibility stuff is only one of multiple possible users now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
4d6e3ac5d4
commit
458fb6792d
6 changed files with 24 additions and 16 deletions
10
hw/qdev.h
10
hw/qdev.h
|
@ -92,11 +92,12 @@ struct PropertyInfo {
|
|||
int (*print)(DeviceState *dev, Property *prop, char *dest, size_t len);
|
||||
};
|
||||
|
||||
struct CompatProperty {
|
||||
typedef struct GlobalProperty {
|
||||
const char *driver;
|
||||
const char *property;
|
||||
const char *value;
|
||||
};
|
||||
QTAILQ_ENTRY(GlobalProperty) next;
|
||||
} GlobalProperty;
|
||||
|
||||
/*** Board API. This should go away once we have a machine config file. ***/
|
||||
|
||||
|
@ -256,8 +257,9 @@ void qdev_prop_set_macaddr(DeviceState *dev, const char *name, uint8_t *value);
|
|||
void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value);
|
||||
void qdev_prop_set_defaults(DeviceState *dev, Property *props);
|
||||
|
||||
void qdev_prop_register_compat(CompatProperty *props);
|
||||
void qdev_prop_set_compat(DeviceState *dev);
|
||||
void qdev_prop_register_global(GlobalProperty *prop);
|
||||
void qdev_prop_register_global_list(GlobalProperty *props);
|
||||
void qdev_prop_set_globals(DeviceState *dev);
|
||||
|
||||
/* This is a nasty hack to allow passing a NULL bus to qdev_create. */
|
||||
extern struct BusInfo system_bus_info;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue