[PATCH 00/12] move validations from domain_conf.c to

Daniel Henrique Barboza posted 12 patches 3 years, 4 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20201211180516.1952683-1-danielhb413@gmail.com
src/conf/domain_conf.c     | 1040 ++----------------------------------
src/conf/domain_conf.h     |   58 +-
src/conf/domain_validate.c |  966 ++++++++++++++++++++++++++++++++-
src/conf/domain_validate.h |   31 +-
src/libvirt_private.syms   |    9 +-
src/libxl/libxl_domain.c   |    1 +
src/libxl/libxl_driver.c   |    1 +
src/lxc/lxc_driver.c       |    1 +
src/lxc/lxc_process.c      |    1 +
src/qemu/qemu_domain.c     |    1 +
src/qemu/qemu_driver.c     |    1 +
src/qemu/qemu_process.c    |    1 +
12 files changed, 1066 insertions(+), 1045 deletions(-)
[PATCH 00/12] move validations from domain_conf.c to
Posted by Daniel Henrique Barboza 3 years, 4 months ago
Hi,

This is a continuation of what we started in [1]. The changes
are all trivial, but done in parts to make the review less
annoying.

domain_conf.c is still a huge beast, but here we're putting it on
a diet, losing ~1k lines.


[1] https://www.redhat.com/archives/libvir-list/2020-December/msg00509.html 

Daniel Henrique Barboza (12):
  domain_conf: move duplicate check functions to domain_validate.c
  domain_conf.c: rename virDomainDeviceInfoIterateInternal()
  domain_conf: move address validation functions to domain_validate.c
  domain_conf: move all virDomainDefValidateInternal() helpers to
    domain_validate.c
  domain_conf.c: move virDomainDeviceDefValidate() to domain_validate.c
  domain_validate.c: make local functions static
  domain_conf: move net device validation to domain_validate.c
  domain_conf: move all DeviceDefValidateInternal() helpers to
    domain_validate
  domain_conf.c: move virDomainDeviceDefValidate() to domain_validate.c
  domain_validate.c: make virDomainDeviceDefValidateInternal() helpers
    static
  domain_validate.c: put IOMMU validation into a new function
  domain_validate.c: use VIR_ERR_CONFIG_UNSUPPORTED in validate
    functions

 src/conf/domain_conf.c     | 1040 ++----------------------------------
 src/conf/domain_conf.h     |   58 +-
 src/conf/domain_validate.c |  966 ++++++++++++++++++++++++++++++++-
 src/conf/domain_validate.h |   31 +-
 src/libvirt_private.syms   |    9 +-
 src/libxl/libxl_domain.c   |    1 +
 src/libxl/libxl_driver.c   |    1 +
 src/lxc/lxc_driver.c       |    1 +
 src/lxc/lxc_process.c      |    1 +
 src/qemu/qemu_domain.c     |    1 +
 src/qemu/qemu_driver.c     |    1 +
 src/qemu/qemu_process.c    |    1 +
 12 files changed, 1066 insertions(+), 1045 deletions(-)

-- 
2.26.2

Re: [PATCH 00/12] move validations from domain_conf.c to
Posted by Michal Privoznik 3 years, 4 months ago
On 12/11/20 7:05 PM, Daniel Henrique Barboza wrote:
> Hi,
> 
> This is a continuation of what we started in [1]. The changes
> are all trivial, but done in parts to make the review less
> annoying.
> 
> domain_conf.c is still a huge beast, but here we're putting it on
> a diet, losing ~1k lines.
> 
> 
> [1] https://www.redhat.com/archives/libvir-list/2020-December/msg00509.html
> 
> Daniel Henrique Barboza (12):
>    domain_conf: move duplicate check functions to domain_validate.c
>    domain_conf.c: rename virDomainDeviceInfoIterateInternal()
>    domain_conf: move address validation functions to domain_validate.c
>    domain_conf: move all virDomainDefValidateInternal() helpers to
>      domain_validate.c
>    domain_conf.c: move virDomainDeviceDefValidate() to domain_validate.c
>    domain_validate.c: make local functions static
>    domain_conf: move net device validation to domain_validate.c
>    domain_conf: move all DeviceDefValidateInternal() helpers to
>      domain_validate
>    domain_conf.c: move virDomainDeviceDefValidate() to domain_validate.c
>    domain_validate.c: make virDomainDeviceDefValidateInternal() helpers
>      static
>    domain_validate.c: put IOMMU validation into a new function
>    domain_validate.c: use VIR_ERR_CONFIG_UNSUPPORTED in validate
>      functions
> 
>   src/conf/domain_conf.c     | 1040 ++----------------------------------
>   src/conf/domain_conf.h     |   58 +-
>   src/conf/domain_validate.c |  966 ++++++++++++++++++++++++++++++++-
>   src/conf/domain_validate.h |   31 +-
>   src/libvirt_private.syms   |    9 +-
>   src/libxl/libxl_domain.c   |    1 +
>   src/libxl/libxl_driver.c   |    1 +
>   src/lxc/lxc_driver.c       |    1 +
>   src/lxc/lxc_process.c      |    1 +
>   src/qemu/qemu_domain.c     |    1 +
>   src/qemu/qemu_driver.c     |    1 +
>   src/qemu/qemu_process.c    |    1 +
>   12 files changed, 1066 insertions(+), 1045 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Nice cleanup.

Michal

Re: [PATCH 00/12] move validations from domain_conf.c to
Posted by Daniel Henrique Barboza 3 years, 4 months ago

On 12/14/20 7:18 AM, Michal Privoznik wrote:
> On 12/11/20 7:05 PM, Daniel Henrique Barboza wrote:
>> Hi,
>>
>> This is a continuation of what we started in [1]. The changes
>> are all trivial, but done in parts to make the review less
>> annoying.
>>
>> domain_conf.c is still a huge beast, but here we're putting it on
>> a diet, losing ~1k lines.
>>
>>
>> [1] https://www.redhat.com/archives/libvir-list/2020-December/msg00509.html
>>
>> Daniel Henrique Barboza (12):
>>    domain_conf: move duplicate check functions to domain_validate.c
>>    domain_conf.c: rename virDomainDeviceInfoIterateInternal()
>>    domain_conf: move address validation functions to domain_validate.c
>>    domain_conf: move all virDomainDefValidateInternal() helpers to
>>      domain_validate.c
>>    domain_conf.c: move virDomainDeviceDefValidate() to domain_validate.c
>>    domain_validate.c: make local functions static
>>    domain_conf: move net device validation to domain_validate.c
>>    domain_conf: move all DeviceDefValidateInternal() helpers to
>>      domain_validate
>>    domain_conf.c: move virDomainDeviceDefValidate() to domain_validate.c
>>    domain_validate.c: make virDomainDeviceDefValidateInternal() helpers
>>      static
>>    domain_validate.c: put IOMMU validation into a new function
>>    domain_validate.c: use VIR_ERR_CONFIG_UNSUPPORTED in validate
>>      functions
>>
>>   src/conf/domain_conf.c     | 1040 ++----------------------------------
>>   src/conf/domain_conf.h     |   58 +-
>>   src/conf/domain_validate.c |  966 ++++++++++++++++++++++++++++++++-
>>   src/conf/domain_validate.h |   31 +-
>>   src/libvirt_private.syms   |    9 +-
>>   src/libxl/libxl_domain.c   |    1 +
>>   src/libxl/libxl_driver.c   |    1 +
>>   src/lxc/lxc_driver.c       |    1 +
>>   src/lxc/lxc_process.c      |    1 +
>>   src/qemu/qemu_domain.c     |    1 +
>>   src/qemu/qemu_driver.c     |    1 +
>>   src/qemu/qemu_process.c    |    1 +
>>   12 files changed, 1066 insertions(+), 1045 deletions(-)
>>
> 
> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
> 
> Nice cleanup.


Thanks! Pushed to master.


DHB






> 
> Michal
>