mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
qom: Allow optional sugar props
Global properties have an @optional field, which allows to apply a given property to a given type even if one of its subclasses doesn't support it. This is especially used in the compat code when dealing with the "disable-modern" and "disable-legacy" properties and the "virtio-pci" type. Allow object_register_sugar_prop() to set this field as well. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <159738953558.377274.16617742952571083440.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
5b19cb63d9
commit
a8dc82ce82
4 changed files with 18 additions and 9 deletions
|
@ -179,7 +179,8 @@ void configure_rtc(QemuOpts *opts)
|
|||
if (!strcmp(value, "slew")) {
|
||||
object_register_sugar_prop("mc146818rtc",
|
||||
"lost_tick_policy",
|
||||
"slew");
|
||||
"slew",
|
||||
false);
|
||||
} else if (!strcmp(value, "none")) {
|
||||
/* discard is default */
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue