diff mbox series

Added missing copyright for strlcpy function

Message ID 20201230115714.156972-1-sbabic@denx.de
State Changes Requested
Headers show
Series Added missing copyright for strlcpy function | expand

Commit Message

Stefano Babic Dec. 30, 2020, 11:57 a.m. UTC
strlcpy() does not exist in Linux and the function in SWUpdate was taken
from FreeBSD code. Add the missing Copyright of the author.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reported-by: Bastian Germann <bage@linutronix.de>
---
 core/util.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Bastian Germann Dec. 30, 2020, 10:09 p.m. UTC | #1
Am 30.12.20 um 12:57 schrieb Stefano Babic:
> strlcpy() does not exist in Linux and the function in SWUpdate was taken
> from FreeBSD code. Add the missing Copyright of the author.
> 
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> Reported-by: Bastian Germann <bage@linutronix.de>
> ---
>   core/util.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/core/util.c b/core/util.c
> index 69d02c5..466507d 100644
> --- a/core/util.c
> +++ b/core/util.c
> @@ -225,6 +225,12 @@ char *substring(const char *src, int first, int len) {
>   
>   #if defined(__linux__)
>   
> +/*
> + * strlcpy() does not exist in Linux, and this function is copied from freebsd
> + *
> + * Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


(That is the missing ISC license)

> + */
> +
>   /*
>    * Copy string src to buffer dst of size dsize.  At most dsize-1
>    * chars will be copied.  Always NUL terminates (unless dsize == 0).
>
Stefano Babic Dec. 31, 2020, 10:13 a.m. UTC | #2
Hi Bastian,

On 30.12.20 23:09, Bastian Germann wrote:
> Am 30.12.20 um 12:57 schrieb Stefano Babic:
>> strlcpy() does not exist in Linux and the function in SWUpdate was taken
>> from FreeBSD code. Add the missing Copyright of the author.
>>
>> Signed-off-by: Stefano Babic <sbabic@denx.de>
>> Reported-by: Bastian Germann <bage@linutronix.de>
>> ---
>>   core/util.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/core/util.c b/core/util.c
>> index 69d02c5..466507d 100644
>> --- a/core/util.c
>> +++ b/core/util.c
>> @@ -225,6 +225,12 @@ char *substring(const char *src, int first, int 
>> len) {
>>   #if defined(__linux__)
>> +/*
>> + * strlcpy() does not exist in Linux, and this function is copied 
>> from freebsd
>> + *
>> + * Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
> 
> Permission to use, copy, modify, and distribute this software for any
> purpose with or without fee is hereby granted, provided that the above
> copyright notice and this permission notice appear in all copies.
> 
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> 
> 
> (That is the missing ISC license)
> 

mmhhh....this conflicts with the SPDX rules with the header just at the 
beginning of file. I will do in another way.

Regards,
Stefano Babic

>> + */
>> +
>>   /*
>>    * Copy string src to buffer dst of size dsize.  At most dsize-1
>>    * chars will be copied.  Always NUL terminates (unless dsize == 0).
>>
diff mbox series

Patch

diff --git a/core/util.c b/core/util.c
index 69d02c5..466507d 100644
--- a/core/util.c
+++ b/core/util.c
@@ -225,6 +225,12 @@  char *substring(const char *src, int first, int len) {
 
 #if defined(__linux__)
 
+/*
+ * strlcpy() does not exist in Linux, and this function is copied from freebsd
+ *
+ * Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
+ */
+
 /*
  * Copy string src to buffer dst of size dsize.  At most dsize-1
  * chars will be copied.  Always NUL terminates (unless dsize == 0).