[PATCH v3 01/14] domain_conf: move boot timeouts check to domain_validate.c

Daniel Henrique Barboza danielhb413 at gmail.com
Wed Dec 9 10:35:09 UTC 2020



On 12/9/20 5:13 AM, Michal Privoznik wrote:
> On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote:
>> This patch creates a new function, virDomainDefBootValidate(), to host
>> the validation of boot menu timeout and rebootTimeout outside of parse
>> time. The checks in virDomainDefParseBootXML() were changed to throw
>> VIR_ERR_XML_ERROR in case of parse error of those values.
>>
>> In an attempt to alleviate the amount of code being stacked inside
>> domain_conf.c, let's put this new function in a new domain_validate.c
>> file that will be used to place these validations.
>>
>> Suggested-by: Michal Privoznik <mprivozn at redhat.com>
>> Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>

[...]

>> diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
>> new file mode 100644
>> index 0000000000..e4d947c553
>> --- /dev/null
>> +++ b/src/conf/domain_validate.c
>> @@ -0,0 +1,51 @@
>> +/*
>> + * domain_validate.c: domain general validation functions
>> + *
>> + * Copyright IBM Corp, 2020
> 
> Honestly, I have only vague idea how these Copyright lines work, but shouldn't they also include (at least subset) of the lines from the original file? I mean, my common sense tells me that if I have a file written by person X, and later the file is split into two the person X is still the original author. Extending that, if a company holds a copyright on a file then moving bits out to a different file should keep the copyright. But I admit that law has completely different model of "common sense". And also there is a disconnection between files and these Copyright lines. If a copyright holder Y changed a tiny bit that is not moved - should their Copyright line also appear in the new file?

TBH I have no idea what's the best practice here. What I did was simply
copy the Copyright header from qemu_validate.c. I believe I can add
a "This file was based on src/qemu/qemu_validate.c", since the inspiration
is quite obvious in this case, right after the legal text. I see some
people doing this in QEMU.

I see people putting copyright nominal in their own name as well. I guess
this means that the original author wasn't bind to a company contract by
the time the file was created or something like that. I am not sure about
the implications of having a copyright in your own name, aside from people
emailing you to ask for a license change (Linus and the GPLv3 versus LGPLv2
comes to mind).


Anyway, I'm happy to hear suggestions about how to handle this copyright
text :)



Thanks,


DHB


> 
> Michal
> 




More information about the libvir-list mailing list