[PATCH 00/15] move validations out of qemu_domain.c

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

 



This is a suggestion made by Peter in [1], in the review
discussion of a series in which I started moving qemuCaps
validation from qemu_command.c to qemu_domain.c [2]. I'll
quote here what he said back then:

"My only suggestion is that after this we should move all
validation into a separate file. qemu_domain was a code dumping
place for a long time and since we now have a lot of common code
moving it out would be benficial for cleaning up an making it
more obvious."

This is my first go at it with a new file called 'qemu_validate.c'.
 The code changes are trivial - just moving stuff from qemu_domain
to qemu_validate - but the amount of changes can sure make for
really tedious reviews. Patches were split according to my own
criteria of how annoying would it be to review each one. The
maintainer is, as always, welcome to squash them up as necessary.

There are still validations to be moved inside qemu_domain.c
after this series. I chose to do this first round to validate
the idea instead of rocking a 40-something patch series all of a
sudden. Once this is figured out we can proceed with the moving.

After all this is settled I intend to continue the work I started
in [2], but using qemu_validate.c instead of qemu_domain.c as
destination.

[1] https://www.redhat.com/archives/libvir-list/2019-December/msg00608.html
[2] https://www.redhat.com/archives/libvir-list/2019-December/msg00570.html

Daniel Henrique Barboza (15):
  qemu: introducing qemu_validate.c/h
  qemu: move static functions of qemuDomainDefValidate()
  qemu: move qemuDomainValidateDef() to qemu_validate.c
  qemu: move qemuDomainDeviceDefValidateAddress() to qemu_validation.c
  qemu: move qemuDomainDeviceDefValidateAddress() to qemu_validate.c
  qemu: move qemuDomainChrDefValidate() to qemu_validate.c
  qemu: move qemuDomainDeviceDefValidateHostdev() to qemu_validate.c
  qemu: move qemuDomainDeviceDefValidateVideo() to qemu_validate.c
  qemu: move qemuDomainDeviceDefValidateDisk() to qemu_validate.c
  qemu: move qemuValidateDomainDeviceDefController() to qemu_validate.c
  qemu: move qemuDomainDeviceDefValidateGraphics() to qemu_validate.c
  qemu: move qemuDomainDeviceDefValidateFS() to qemu_validate.c
  qemu: move qemuDomainDeviceDefValidateSound() to qemu_validate.c
  qemu: move remaining qemuDomainDeviceDefValidate() helpers
  qemu: move qemuValidateDomainDeviceDef() to qemu_validate.c

 po/POTFILES.in           |    1 +
 src/qemu/Makefile.inc.am |    2 +
 src/qemu/qemu_domain.c   | 3895 ++------------------------------------
 src/qemu/qemu_validate.c | 3592 +++++++++++++++++++++++++++++++++++
 src/qemu/qemu_validate.h |   34 +
 tests/qemublocktest.c    |    3 +-
 6 files changed, 3801 insertions(+), 3726 deletions(-)
 create mode 100644 src/qemu/qemu_validate.c
 create mode 100644 src/qemu/qemu_validate.h

-- 
2.25.1






[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