mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qdev: Introduce PropertyInfo.create
This allows property implementation to provide a specialized property creation method. Update conditions guarding property types accordingly. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170714021509.23681-3-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
8f5d58ef2c
commit
faabdbb792
3 changed files with 21 additions and 13 deletions
2
qmp.c
2
qmp.c
|
@ -480,7 +480,7 @@ static DevicePropertyInfo *make_device_property_info(ObjectClass *klass,
|
|||
* for removal. This conditional should be removed along with
|
||||
* it.
|
||||
*/
|
||||
if (!prop->info->set) {
|
||||
if (!prop->info->set && !prop->info->create) {
|
||||
return NULL; /* no way to set it, don't show */
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue