]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/ include/: cleanup licence headers
authorKarel Zak <kzak@redhat.com>
Tue, 20 Jun 2023 10:52:35 +0000 (12:52 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Jun 2023 10:52:35 +0000 (12:52 +0200)
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 <kzak@redhat.com>
14 files changed:
include/colors.h
include/cpuset.h
include/env.h
include/mbsalign.h
include/timeutils.h
lib/colors.c
lib/cpuset.c
lib/mbsalign.c
lib/mbsedit.c
lib/path.c
lib/procfs.c
lib/sysfs.c
lib/timeutils.c
lib/xxhash.c

index fe84d8bb906313f26cc371f1514f699f93d59cfb..d91f5af4544447cf796fe80809683f4ba4b31ffb 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
  * Copyright (C) 2012 Ondrej Oprala <ooprala@redhat.com>
  * Copyright (C) 2012-2014 Karel Zak <kzak@redhat.com>
  *
index 5a531bf006eefbb37d5904a5e65f7345eb235e35..119c1a04c6f79e50a98cadc391367be7850f4b27 100644 (file)
@@ -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.
  */
index 9c853eac2f4a7b94cd72aeb05d422a773fe800e2..9a0ec4f9cf32db561222a77b6dd43b2edd77fe2c 100644 (file)
@@ -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
 
index 4f5add8b8a8706ba4e99b5dd48e5107fffc69d38..6e56755829dc1c700da3413ba25c7d4861cf9eb6 100644 (file)
@@ -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 <kzak@redhat.com>
-
-   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 <http://www.gnu.org/licenses/>.  */
+/*
+ * 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 <kzak@redhat.com>
+ *
+ * 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 <stddef.h>
index 9c99ef5a75269188964780cdb5026760b9c8e361..4ce57a4255868e7fec5241bc1673e44033b78838 100644 (file)
@@ -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 <kzak@redhat.com>
-
-  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 <http://www.gnu.org/licenses/>.
-***/
+/*
+ * 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 <kzak@redhat.com>
+ *
+ * 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
 
index 621dca336461df13496246908c80b941586de6d7..532e339502f4e5643f5fac1dc23c141249e8c430 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
  * Copyright (C) 2012 Ondrej Oprala <ooprala@redhat.com>
  * Copyright (C) 2012-2014 Karel Zak <kzak@redhat.com>
  *
index 9c3284c65022c6882fc8f58a48e8429ae5d94ccd..098b8e5ae5a5c4c0d549ebbab5437df8e5a7a470 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
  * Terminology:
  *
  *     cpuset  - (libc) cpu_set_t data structure represents set of CPUs
index fbb6f157e2b4661ab6844e3a9806ce7b6b609405..7b8f5a665d9f77af0562a2012f52a0fb54382458 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.  */
-
-/* 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 <stdlib.h>
 #include <string.h>
 #include <stdio.h>
index 8ce59016fa67da381cf24afc318c795d61cf10a5..ecfa9f47915659e8880dfdbe007b207f6216c9d0 100644 (file)
@@ -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.
  *
index 8da6c06db05a212095393f208bb17cba459a2e5b..95a6b8b895a6e750ad6629c16e3a5ac363c89c67 100644 (file)
@@ -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 <kzak@redhat.com>
+ *
+ *
  * 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 <kzak@redhat.com> [February 2018]
  */
 #include <stdarg.h>
 #include <string.h>
index e9cf17a47c7b861f6615bdfad07d4b70dfeb38ac..aff20fb6605cf58f0c0e0312ea294127ba51ba1a 100644 (file)
@@ -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 <kzak@redhat.com>
+ * Copyright (C) 2021 Karel Zak <kzak@redhat.com>
  */
 #include <ctype.h>
 #include <unistd.h>
index 3c2027d994058d71a5da233142c5fbe4212cd17a..dfacf4a4a77cc720bb5d4b9954d4df9d26ea290e 100644 (file)
@@ -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 <kzak@redhat.com>
+ * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
  */
 #include <ctype.h>
 #include <libgen.h>
index 7e4855b692a42ccb71b2681da4b396b263e3bf90..34c7c8dafee82b9375b3f5ba7ac826f7a05d2e31 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
-***/
-
+/*
+ * 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 <kzak@redhat.com>
+ *
+ * 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 <assert.h>
 #include <ctype.h>
 #include <stdlib.h>
index 0fae88c5d673e79a1c268587ba58aacaf676cf68..691ef1a8f534bfffc7be99bbf1378587f608ea3b 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * xxHash - Extremely Fast Hash algorithm
  * Copyright (C) 2012-2020 Yann Collet
  *