Files
Marc-André Lureau f66e192f72 qom: replace object_property_add_tm with StructTm QAPI type
Define a StructTm QAPI struct in common.json matching the existing
"struct tm" property wire format (tm_year, tm_mon, tm_mday, tm_hour,
tm_min, tm_sec as int32).

Convert the two callers (mc146818rtc and spapr_rtc) to pass its
QAPITypeInfo to object_class_property_add() / object_property_add(),
and use a standard ObjectPropertyAccessor that populates a StructTm
and calls the generated visitor.

Remove object_property_add_tm(), object_class_property_add_tm(),
the TMProperty type, and the property_get_tm() helper from
qom/object.c, along with their declarations in object.h.

Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-42-armbru@redhat.com>
2026-11-02 19:35:21 +01:00

119 lines
4.4 KiB
JSON

# -*- Mode: Python -*-
# vim: filetype=python
{ 'pragma': { 'doc-required': true } }
# Entries in these lists are allowed to violate the QAPI rules (for
# historical reasons); think twice before you add to them!
{ 'pragma': {
# Command names containing '_'
'command-name-exceptions': [
'add_client',
'block_resize',
'block_set_io_throttle',
'client_migrate_info',
'device_add',
'device_del',
'expire_password',
'migrate_cancel',
'netdev_add',
'netdev_del',
'qmp_capabilities',
'set_link',
'set_password',
'system_powerdown',
'system_reset',
'system_wakeup' ],
# Commands allowed to return a non-dictionary
'command-returns-exceptions': [
'human-monitor-command',
'qom-get',
'query-tpm-models',
'query-tpm-types',
'ringbuf-read' ],
# Types, commands, and events with undocumented members / arguments:
'documentation-exceptions': [
'AbortWrapper',
'AudiodevDriver',
'BlkdebugEvent',
'BlockDirtyBitmapAddWrapper',
'BlockDirtyBitmapMergeWrapper',
'BlockDirtyBitmapWrapper',
'BlockdevBackupWrapper',
'BlockdevDriver',
'BlockdevQcow2EncryptionFormat',
'BlockdevSnapshotInternalWrapper',
'BlockdevSnapshotSyncWrapper',
'BlockdevSnapshotWrapper',
'BlockdevVmdkAdapterType',
'DisplayProtocol',
'DriveBackupWrapper',
'DummyBlockCoreForceArrays',
'DummyBootCertificates',
'DummyForceArrays',
'DummyVirtioForceArrays',
'HotKeyMod',
'ImageInfoSpecificKind',
'InputAxis',
'InputButton',
'IscsiHeaderDigest',
'IscsiTransport',
'KeyValueKind',
'MemoryDeviceInfoKind',
'MigrationParameter',
'NetClientDriver',
'ObjectType',
'QKeyCode',
'RbdAuthMode',
'RbdImageEncryptionFormat',
'S390CpuEntitlement',
'S390CpuPolarization',
'S390CpuState',
'SsidSizeMode',
'String',
'StringWrapper',
'SysEmuTarget',
'ThrottleGroupProperties',
'VncPrimaryAuth',
'VncVencryptSubAuth',
'X86CPURegister32',
'XDbgBlockGraph',
'YankInstanceType',
'blockdev-reopen' ],
# Externally visible types whose member names may use uppercase or '_'
'member-name-exceptions': [ # visible in:
'ACPISlotType', # query-acpi-ospm-status
'AcpiTableOptions', # -acpitable
'BlkdebugEvent', # blockdev-add, -blockdev
'BlkdebugSetStateOptions', # blockdev-add, -blockdev
'BlockDeviceInfo', # query-block
'BlockDeviceStats', # query-blockstats
'BlockDeviceTimedStats', # query-blockstats
'BlockIOThrottle', # block_set_io_throttle
'BlockInfo', # query-block
'BlockdevAioOptions', # blockdev-add, -blockdev
'BlockdevDriver', # blockdev-add, query-blockstats, ...
'BlockdevVmdkAdapterType', # blockdev-create (to match VMDK spec)
'BlockdevVmdkSubformat', # blockdev-create (to match VMDK spec)
'ColoCompareProperties', # object_add, -object
'FilterMirrorProperties', # object_add, -object
'FilterRedirectorProperties', # object_add, -object
'FilterRewriterProperties', # object_add, -object
'InputLinuxProperties', # object_add, -object
'NetdevTapOptions', # netdev_add, query-netdev, -netdev
'ObjectType', # object-add, -object
'PCIELinkSpeed', # internal only
'PciBusInfo', # query-pci
'PciDeviceInfo', # query-pci
'PciMemoryRegion', # query-pci
'QKeyCode', # send-key, input-sent-event
'QapiErrorClass', # QMP error replies
'SshHostKeyCheckMode', # blockdev-add, -blockdev
'StructTm', # qom-get of RTC date property
'SysEmuTarget', # query-cpu-fast, query-target
'UuidInfo', # query-uuid
'VncClientInfo', # query-vnc, query-vnc-servers, ...
'X86CPURegister32' # qom-get of x86 CPU properties
# feature-words, filtered-features
] } }