]> git.ipfire.org Git - thirdparty/libvirt.git/commit
src: add constants for guest info 'timezone.' parameters
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 27 Feb 2025 13:42:08 +0000 (13:42 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 12 Mar 2025 09:58:07 +0000 (09:58 +0000)
commite7a122a192ef5e2e7c1a5695a617bd1fabe79522
treec9a3c842b4a9bdc05b322b8628b8a93ab62b0e64
parent7192539cec7615ae59ab53a4a4e59c5f163c6e2f
src: add constants for guest info 'timezone.' parameters

Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
include/libvirt/libvirt-domain.h
src/libvirt-domain.c
src/qemu/qemu_agent.c