From: Karel Zak Date: Tue, 20 Jun 2023 10:52:35 +0000 (+0200) Subject: lib/ include/: cleanup licence headers X-Git-Tag: v2.40-rc1~380 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79feaa6022453d3c62ddf8396d4b6475344a46a3;p=thirdparty%2Futil-linux.git lib/ include/: cleanup licence headers This patch does not change any license of the affected files. Changes: * add missing SPDX-License-Identifier lines for LGPL * copy missing license lines from code (lib/) to header files (include/) * use the same comment formatting Signed-off-by: Karel Zak --- diff --git a/include/colors.h b/include/colors.h index fe84d8bb90..d91f5af454 100644 --- a/include/colors.h +++ b/include/colors.h @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: LGPL-2.1-or-later + * * Copyright (C) 2012 Ondrej Oprala * Copyright (C) 2012-2014 Karel Zak * diff --git a/include/cpuset.h b/include/cpuset.h index 5a531bf006..119c1a04c6 100644 --- a/include/cpuset.h +++ b/include/cpuset.h @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: LGPL-2.1-or-later + * * This file may be redistributed under the terms of the * GNU Lesser General Public License. */ diff --git a/include/env.h b/include/env.h index 9c853eac2f..9a0ec4f9cf 100644 --- a/include/env.h +++ b/include/env.h @@ -1,3 +1,7 @@ +/* + * No copyright is claimed. This code is in the public domain; do with + * it what you wish. + */ #ifndef UTIL_LINUX_ENV_H #define UTIL_LINUX_ENV_H diff --git a/include/mbsalign.h b/include/mbsalign.h index 4f5add8b8a..6e56755829 100644 --- a/include/mbsalign.h +++ b/include/mbsalign.h @@ -1,19 +1,15 @@ -/* Align/Truncate a string in a given screen width - Copyright (C) 2009-2010 Free Software Foundation, Inc. - Copyright (C) 2010-2013 Karel Zak - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * Align/Truncate a string in a given screen width + * Copyright (C) 2009-2010 Free Software Foundation, Inc. + * Copyright (C) 2010-2013 Karel Zak + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 2.1 of the License, or (at your + * option) any later version. + */ #ifndef UTIL_LINUX_MBSALIGN_H # define UTIL_LINUX_MBSALIGN_H # include diff --git a/include/timeutils.h b/include/timeutils.h index 9c99ef5a75..4ce57a4255 100644 --- a/include/timeutils.h +++ b/include/timeutils.h @@ -1,26 +1,17 @@ -/*** - SPDX-License-Identifier: LGPL-2.1-or-later - - - First set of functions in this file are part of systemd, and were - copied to util-linux at August 2013. - - Copyright 2010 Lennart Poettering - Copyright (C) 2014 Karel Zak - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see . -***/ +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * First set of functions in this file are part of systemd, and were + * copied to util-linux at August 2013. + * + * Copyright 2010 Lennart Poettering + * Copyright (C) 2014 Karel Zak + * + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + */ #ifndef UTIL_LINUX_TIME_UTIL_H #define UTIL_LINUX_TIME_UTIL_H diff --git a/lib/colors.c b/lib/colors.c index 621dca3364..532e339502 100644 --- a/lib/colors.c +++ b/lib/colors.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: LGPL-2.1-or-later + * * Copyright (C) 2012 Ondrej Oprala * Copyright (C) 2012-2014 Karel Zak * diff --git a/lib/cpuset.c b/lib/cpuset.c index 9c3284c650..098b8e5ae5 100644 --- a/lib/cpuset.c +++ b/lib/cpuset.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: LGPL-2.1-or-later + * * Terminology: * * cpuset - (libc) cpu_set_t data structure represents set of CPUs diff --git a/lib/mbsalign.c b/lib/mbsalign.c index fbb6f157e2..7b8f5a665d 100644 --- a/lib/mbsalign.c +++ b/lib/mbsalign.c @@ -1,21 +1,16 @@ -/* Align/Truncate a string in a given screen width - Copyright (C) 2009-2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Pádraig Brady. */ - +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * Align/Truncate a string in a given screen width + * Copyright (C) 2009-2010 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 2.1 of the License, or (at your + * option) any later version. + * + * Written by Pádraig Brady. + */ #include #include #include diff --git a/lib/mbsedit.c b/lib/mbsedit.c index 8ce59016fa..ecfa9f4791 100644 --- a/lib/mbsedit.c +++ b/lib/mbsedit.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: LGPL-2.1-or-later + * * Very simple multibyte buffer editor. Allows to maintaine the current * position in the string, add and remove chars on the current position. * diff --git a/lib/path.c b/lib/path.c index 8da6c06db0..95a6b8b895 100644 --- a/lib/path.c +++ b/lib/path.c @@ -1,4 +1,10 @@ /* + * No copyright is claimed. This code is in the public domain; do with + * it what you wish. + * + * Copyright (C) 2018 Karel Zak + * + * * Simple functions to access files. Paths can be globally prefixed to read * data from an alternative source (e.g. a /proc dump for regression tests). * @@ -7,11 +13,6 @@ * * The ul_path_read_* API is possible to use without path_cxt handler. In this * case is not possible to use global prefix and printf-like formatting. - * - * No copyright is claimed. This code is in the public domain; do with - * it what you wish. - * - * Written by Karel Zak [February 2018] */ #include #include diff --git a/lib/procfs.c b/lib/procfs.c index e9cf17a47c..aff20fb660 100644 --- a/lib/procfs.c +++ b/lib/procfs.c @@ -2,7 +2,7 @@ * No copyright is claimed. This code is in the public domain; do with * it what you wish. * - * Written by Karel Zak + * Copyright (C) 2021 Karel Zak */ #include #include diff --git a/lib/sysfs.c b/lib/sysfs.c index 3c2027d994..dfacf4a4a7 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -2,7 +2,7 @@ * No copyright is claimed. This code is in the public domain; do with * it what you wish. * - * Written by Karel Zak + * Copyright (C) 2011 Karel Zak */ #include #include diff --git a/lib/timeutils.c b/lib/timeutils.c index 7e4855b692..34c7c8dafe 100644 --- a/lib/timeutils.c +++ b/lib/timeutils.c @@ -1,23 +1,17 @@ -/*** - First set of functions in this file are part of systemd, and were - copied to util-linux at August 2013. - - Copyright 2010 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with util-linux; If not, see . -***/ - +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * First set of functions in this file are part of systemd, and were + * copied to util-linux at August 2013. + * + * Copyright 2010 Lennart Poettering + * Copyright (C) 2014 Karel Zak + * + * This is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + */ #include #include #include diff --git a/lib/xxhash.c b/lib/xxhash.c index 0fae88c5d6..691ef1a8f5 100644 --- a/lib/xxhash.c +++ b/lib/xxhash.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: BSD-2-Clause + * * xxHash - Extremely Fast Hash algorithm * Copyright (C) 2012-2020 Yann Collet *