qdev: Introduce DEFINE_PROP_LINK

This property can be used to replace the object_property_add_link in
device code, to add a link to other objects, which is a common pattern.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170714021509.23681-4-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Fam Zheng 2017-07-14 10:14:52 +08:00 committed by Paolo Bonzini
parent faabdbb792
commit 5b4ff3c661
3 changed files with 28 additions and 0 deletions

View file

@ -233,6 +233,7 @@ struct Property {
int arrayoffset;
PropertyInfo *arrayinfo;
int arrayfieldsize;
const char *link_type;
};
struct PropertyInfo {