On 12/8/20 4:58 PM, Michal Privoznik wrote:
On 12/8/20 6:45 PM, Daniel Henrique Barboza wrote:


On 12/8/20 7:22 AM, Michal Privoznik wrote:


But since we are splitting parsing and validation code can we use this chance 
and move validators out of domain_conf.c allowing it to be smaller in size?


Makes sense. I can create a 'domain_validate.c' and start moving stuff there,
like I did previously with QEMU driver validations and qemu_validate.c.
First order of business would be to move the validations I already played
with in this series to this new file.


What do you think?

Yes, qemu_validate.c example was what I had on mind. I don't have preference 
whether to move everything at once or by smaller pieces (how small?). While the 
latter might look like easier to review, not really since git diff has now 
--color-moved. That way a reviewer can verify that a commit is just moving code.

In fact, I'm respining this series already creating domain_validate.c right
from the start. I find this way more sensible than adding code to domain_conf.c
just to move to a new file afterwards. I'll post a v3 shortly. I'll keep your
R-bs in the patches you already reviewed in v2 (the changes aren't worth
reviewing it again).


About how we're going to move the validations, I'll do what I did with
qemu_validate.c. For example, move all static functions that is called by
virDomainDefValidateInternal() in a single punch, then move
virDomainDefValidateInternal(). Same thing with other relevant validation
functions. This can be done in a follow-up series after this one.


DHB


Michal


Reply via email to