[libvirt PATCH 00/14] Use virTristateXXX for more struct members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a preparation step for some refactoring of the XML parser, see
https://listman.redhat.com/archives/libvir-list/2021-March/msg01066.html

Many libvirt structs have members that are of type `int` but actually are
virTristateBool or virTristateSwitch. Fix this to increase type safety.

Note that the comments on `virStorageAdapterFCHost::managed` and
`virStoragePoolSourceDevice::part_separator` (patches #12 and #13) were
actually wrong.

Cheers,
Tim

Tim Wiederhake (14):
  conf: Use virTristateXXX in virStorageSource
  conf: Use virTristateXXX in virStorageSourceNVMeDef
  conf: Use virTristateXXX in virDomainDeviceInfo
  conf: Use virTristateXXX in virDomainDiskDef
  conf: Use virTristateXXX in virDomainActualNetDef
  conf: Use virTristateXXX in virDomainNetDef
  conf: Use virTristateXXX in virDomainChrSourceDef
  conf: Use virTristateXXX in virDomainGraphicsDef
  conf: Use virTristateXXX in virDomainMemballoonDef
  conf: Use virTristateXXX in virDomainLoaderDef
  conf: Use virTristateXXX in virDomainDef
  conf: Use virTristateXXX in virStorageAdapterFCHost
  conf: Use virTristateXXX in virStoragePoolSourceDevice
  conf: Use virTristateXXX in virPCIDeviceAddress

 src/conf/device_conf.c          |  16 +--
 src/conf/device_conf.h          |   4 +-
 src/conf/domain_conf.c          | 201 +++++++++++++++++++-------------
 src/conf/domain_conf.h          |  28 ++---
 src/conf/storage_adapter_conf.c |   4 +-
 src/conf/storage_adapter_conf.h |   2 +-
 src/conf/storage_conf.c         |   7 +-
 src/conf/storage_conf.h         |   2 +-
 src/conf/storage_source_conf.h  |   4 +-
 src/qemu/qemu_command.c         |   3 +-
 src/qemu/qemu_hotplug.c         |   2 +-
 src/util/virpci.h               |   2 +-
 12 files changed, 162 insertions(+), 113 deletions(-)

-- 
2.26.2





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux