aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2023-12-11 13:37:41 +0100
committerKarel Zak <kzak@redhat.com>2023-12-11 13:37:41 +0100
commit9abd5e4b99fb2d78d8dbbb9144aef68972c65e83 (patch)
tree94d16c7234750cf0c932d12023ed860cb767284f
parent35fe9802cf584c4ff2acce67e695d67bad34361c (diff)
downloadutil-linux-9abd5e4b99fb2d78d8dbbb9144aef68972c65e83.tar.gz
sys-utils: cleanup license lines, add SPDX
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--sys-utils/ctrlaltdel.c16
-rw-r--r--sys-utils/dmesg.c11
-rw-r--r--sys-utils/hwclock-cmos.c6
-rw-r--r--sys-utils/hwclock-rtc.c5
-rw-r--r--sys-utils/hwclock.c15
-rw-r--r--sys-utils/hwclock.h8
-rw-r--r--sys-utils/ipcrm.c11
-rw-r--r--sys-utils/ipcs.c16
-rw-r--r--sys-utils/ipcutils.c11
-rw-r--r--sys-utils/ipcutils.h11
-rw-r--r--sys-utils/irq-common.c12
-rw-r--r--sys-utils/irq-common.h11
-rw-r--r--sys-utils/irqtop.c11
-rw-r--r--sys-utils/ldattach.c19
-rw-r--r--sys-utils/losetup.c12
-rw-r--r--sys-utils/lscpu-arm.c13
-rw-r--r--sys-utils/lscpu-cpu.c10
-rw-r--r--sys-utils/lscpu-cputype.c11
-rw-r--r--sys-utils/lscpu-dmi.c8
-rw-r--r--sys-utils/lscpu-topology.c11
-rw-r--r--sys-utils/lscpu-virt.c11
-rw-r--r--sys-utils/lscpu.c16
-rw-r--r--sys-utils/lscpu.h11
-rw-r--r--sys-utils/lsirq.c11
-rw-r--r--sys-utils/lsmem.c11
-rw-r--r--sys-utils/lsns.c11
-rw-r--r--sys-utils/mount.c12
-rw-r--r--sys-utils/mountpoint.c17
-rw-r--r--sys-utils/nsenter.c14
-rw-r--r--sys-utils/pivot_root.c9
-rw-r--r--sys-utils/prlimit.c22
-rw-r--r--sys-utils/readprofile.c21
-rw-r--r--sys-utils/renice.c2
-rw-r--r--sys-utils/rfkill.c3
-rw-r--r--sys-utils/rtcwake.c11
-rw-r--r--sys-utils/setpgid.c8
-rw-r--r--sys-utils/setsid.c8
-rw-r--r--sys-utils/swapoff.c13
-rw-r--r--sys-utils/swapon-common.c14
-rw-r--r--sys-utils/swapon-common.h13
-rw-r--r--sys-utils/swapon.c13
41 files changed, 296 insertions, 183 deletions
diff --git a/sys-utils/ctrlaltdel.c b/sys-utils/ctrlaltdel.c
index bab3a4c0f0..e973986054 100644
--- a/sys-utils/ctrlaltdel.c
+++ b/sys-utils/ctrlaltdel.c
@@ -1,10 +1,16 @@
/*
- * ctrlaltdel.c - Set the function of the Ctrl-Alt-Del combination
- * Created 4-Jul-92 by Peter Orbaek <poe@daimi.aau.dk>
- * 1999-02-22 Arkadiusz Miśkiewicz <misiek@pld.ORG.PL>
- * - added Native Language Support
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 1992 Peter Orbaek <poe@daimi.aau.dk>
+ * Copyright (C) 1992-1993 Rickard E. Faith <faith@cs.unc.edu>
+ *
+ * Set the function of the Ctrl-Alt-Del combination
*/
-
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 79e1c1690a..a80e1a8cbf 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -1,10 +1,15 @@
/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
* dmesg.c -- Print out the contents of the kernel ring buffer
*
* Copyright (C) 1993 Theodore Ts'o <tytso@athena.mit.edu>
- * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
- *
- * This program comes with ABSOLUTELY NO WARRANTY.
+ * Copyright (C) 2011-2023 Karel Zak <kzak@redhat.com>
*/
#include <stdio.h>
#include <getopt.h>
diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c
index d3173fe9f5..5f59090e3e 100644
--- a/sys-utils/hwclock-cmos.c
+++ b/sys-utils/hwclock-cmos.c
@@ -1,6 +1,12 @@
/*
* SPDX-License-Identifier: GPL-2.0-or-later
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ *
* i386 CMOS starts out with 14 bytes clock data alpha has something
* similar, but with details depending on the machine type.
*
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c
index f918272a14..79867f64f3 100644
--- a/sys-utils/hwclock-rtc.c
+++ b/sys-utils/hwclock-rtc.c
@@ -1,6 +1,11 @@
/*
* SPDX-License-Identifier: GPL-2.0-or-later
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
* rtc.c - Use /dev/rtc for clock access
*/
#include <asm/ioctl.h>
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 9579d9f910..35c73df136 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1,15 +1,22 @@
/*
* SPDX-License-Identifier: GPL-2.0-or-later
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ *
* Since 7a3000f7ba548cf7d74ac77cc63fe8de228a669e (v2.30) hwclock is linked
* with parse_date.y from gnullib. This gnulib code is distributed with GPLv3.
* Use --disable-hwclock-gplv3 to exclude this code.
*
+ * Copyright (C) 1992 Charles Hedrick, hedrick@cs.rutgers.edu
+ * Rob Hooft <hooft@chem.ruu.nl>
+ * Harald Koenig <koenig@nova.tat.physik.uni-tuebingen.de>
+ * Alan Modra <alan@spri.levels.unisa.edu.au>
*
- * clock.c was written by Charles Hedrick, hedrick@cs.rutgers.edu, Apr 1992
- * Modified for clock adjustments - Rob Hooft <hooft@chem.ruu.nl>, Nov 1992
- * Improvements by Harald Koenig <koenig@nova.tat.physik.uni-tuebingen.de>
- * and Alan Modra <alan@spri.levels.unisa.edu.au>.
+ * Copyright (C) 2007-2023 Karel Zak <kzak@redhat.com>
*
* Major rewrite by Bryan Henderson <bryanh@giraffe-data.com>, 96.09.19.
* The new program is called hwclock. New features:
diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h
index a690e717bc..91b10a73bb 100644
--- a/sys-utils/hwclock.h
+++ b/sys-utils/hwclock.h
@@ -1,3 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
#ifndef HWCLOCK_CLOCK_H
#define HWCLOCK_CLOCK_H
diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index 7ea8ffd3ad..d417c5593f 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -1,14 +1,19 @@
/*
- * krishna balasubramanian 1993
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 1993 rishna balasubramanian
*
* 1999-02-22 Arkadiusz Miśkiewicz <misiek@pld.ORG.PL>
* - added Native Language Support
*
* 1999-04-02 frank zago
* - can now remove several id's in the same call
- *
*/
-
#include <errno.h>
#include <getopt.h>
#include <stdio.h>
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index eaf6cb4b1c..e77a657dba 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -1,6 +1,17 @@
-/* Original author unknown, may be "krishna balasub@cis.ohio-state.edu" */
/*
- * Modified Sat Oct 9 10:55:28 1993 for 0.99.13
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Original author unknown, may be "krishna balasub@cis.ohio-state.edu"
+ *
+ * Copyright (C) 1995 ike Jagdis <jaggy@purplet.demon.co.uk>
+ * 1996 janl@math.uio.no
+ * Copyright (C) 2006-2023 Karel Zak <kzak@redhat.com>
+ *
*
* Patches from Mike Jagdis (jaggy@purplet.demon.co.uk) applied Wed Feb 8
* 12:12:21 1995 by faith@cs.unc.edu to print numeric uids if no passwd file
@@ -14,7 +25,6 @@
* 1999-02-22 Arkadiusz Miśkiewicz <misiek@pld.ORG.PL>
* - added Native Language Support
*/
-
#include <errno.h>
#include <getopt.h>
diff --git a/sys-utils/ipcutils.c b/sys-utils/ipcutils.c
index 305ddd7001..4d4bebb747 100644
--- a/sys-utils/ipcutils.c
+++ b/sys-utils/ipcutils.c
@@ -1,3 +1,14 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2012 Sami Kerola <kerolasa@iki.fi>
+ * Copyright (C) 2012-2023 Karel Zak <kzak@redhat.com>
+ */
#include <inttypes.h>
#include "c.h"
diff --git a/sys-utils/ipcutils.h b/sys-utils/ipcutils.h
index db85f57bc4..0234465d2b 100644
--- a/sys-utils/ipcutils.h
+++ b/sys-utils/ipcutils.h
@@ -1,3 +1,14 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2012 Sami Kerola <kerolasa@iki.fi>
+ * Copyright (C) 2012-2023 Karel Zak <kzak@redhat.com>
+ */
#ifndef UTIL_LINUX_IPCUTILS_H
#define UTIL_LINUX_IPCUTILS_H
diff --git a/sys-utils/irq-common.c b/sys-utils/irq-common.c
index f36ed693c8..54af551be1 100644
--- a/sys-utils/irq-common.c
+++ b/sys-utils/irq-common.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: GPL-2.1-or-later
+ *
* irq-common.c - functions to display kernel interrupt information.
*
* Copyright (C) 2019 zhenwei pi <pizhenwei@bytedance.com>
@@ -8,17 +10,7 @@
* 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 library 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#include <ctype.h>
#include <errno.h>
#include <limits.h>
diff --git a/sys-utils/irq-common.h b/sys-utils/irq-common.h
index 04c43207ee..6db252d527 100644
--- a/sys-utils/irq-common.h
+++ b/sys-utils/irq-common.h
@@ -1,3 +1,14 @@
+/*
+ * SPDX-License-Identifier: GPL-2.1-or-later
+ *
+ * This library 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.
+ *
+ * Copyright (C) 2012 Sami Kerola <kerolasa@iki.fi>
+ * Copyright (C) 2012-2023 Karel Zak <kzak@redhat.com>
+ */
#ifndef UTIL_LINUX_H_IRQ_COMMON
#define UTIL_LINUX_H_IRQ_COMMON
diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
index 4cad0f97d6..7baa47bafe 100644
--- a/sys-utils/irqtop.c
+++ b/sys-utils/irqtop.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: GPL-2.1-or-later
+ *
* irqtop.c - utility to display kernel interrupt information.
*
* Copyright (C) 2019 zhenwei pi <pizhenwei@bytedance.com>
@@ -8,15 +10,6 @@
* 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 library 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <ctype.h>
#include <errno.h>
diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c
index 0282abd0b2..2a24b3d6f4 100644
--- a/sys-utils/ldattach.c
+++ b/sys-utils/ldattach.c
@@ -1,17 +1,14 @@
-/* line discipline loading daemon
- * open a serial device and attach a line discipline on it
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
*
- * Usage:
- * ldattach GIGASET_M101 /dev/ttyS0
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- * =====================================================================
+ * Line discipline loading daemon open a serial device and attach a line
+ * discipline on it.
*/
-
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index afeb5babbd..7233adf1ca 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -1,6 +1,14 @@
/*
- * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
- * Originally from Ted's losetup.c
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Original implementation from Ted Ts'o; losetup was part of mount.
+ *
+ * Copyright (C) 2011-2023 Karel Zak <kzak@redhat.com>
*
* losetup.c - setup and control loop devices
*/
diff --git a/sys-utils/lscpu-arm.c b/sys-utils/lscpu-arm.c
index 1ac594233f..24bbeb23da 100644
--- a/sys-utils/lscpu-arm.c
+++ b/sys-utils/lscpu-arm.c
@@ -1,21 +1,12 @@
/*
- * lscpu-arm.c - ARM CPU identification tables
- *
- * Copyright (C) 2018 Riku Voipio <riku.voipio@iki.fi>
+ * SPDX-License-Identifier: GPL-2.0-or-later
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it would 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Copyright (C) 2018 Riku Voipio <riku.voipio@iki.fi>
*
* The information here is gathered from
* - ARM manuals
diff --git a/sys-utils/lscpu-cpu.c b/sys-utils/lscpu-cpu.c
index 6250cf70cc..88bdaf0f4c 100644
--- a/sys-utils/lscpu-cpu.c
+++ b/sys-utils/lscpu-cpu.c
@@ -1,3 +1,13 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2020 Karel Zak <kzak@redhat.com>
+ */
#include "lscpu.h"
struct lscpu_cpu *lscpu_new_cpu(int id)
diff --git a/sys-utils/lscpu-cputype.c b/sys-utils/lscpu-cputype.c
index 5063be43bb..e18e49867d 100644
--- a/sys-utils/lscpu-cputype.c
+++ b/sys-utils/lscpu-cputype.c
@@ -1,4 +1,13 @@
-
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2020 Karel Zak <kzak@redhat.com>
+ */
#include <sys/utsname.h>
#include <sys/personality.h>
diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c
index 9b63dd6857..d8fc3dc7b6 100644
--- a/sys-utils/lscpu-dmi.c
+++ b/sys-utils/lscpu-dmi.c
@@ -1,8 +1,12 @@
-// SPDX-License-Identifier: GPL-2.0
/*
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License.
+ *
* Copyright (C) 2020 FUJITSU LIMITED. All rights reserved.
*/
-
#include "lscpu.h"
void to_dmi_header(struct lscpu_dmi_header *h, uint8_t *data)
diff --git a/sys-utils/lscpu-topology.c b/sys-utils/lscpu-topology.c
index 02a90d63f1..7ee18e785e 100644
--- a/sys-utils/lscpu-topology.c
+++ b/sys-utils/lscpu-topology.c
@@ -1,3 +1,14 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2008 Cai Qian <qcai@redhat.com>
+ * Copyright (C) 2008-2023 Karel Zak <kzak@redhat.com>
+ */
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
diff --git a/sys-utils/lscpu-virt.c b/sys-utils/lscpu-virt.c
index e2af63dfa6..4d301271a3 100644
--- a/sys-utils/lscpu-virt.c
+++ b/sys-utils/lscpu-virt.c
@@ -1,3 +1,14 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2008 Cai Qian <qcai@redhat.com>
+ * Copyright (C) 2008-2023 Karel Zak <kzak@redhat.com>
+ */
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 278f2be581..a65ccad5e4 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -1,24 +1,16 @@
/*
- * lscpu - CPU architecture information helper
- *
- * Copyright (C) 2008 Cai Qian <qcai@redhat.com>
- * Copyright (C) 2008 Karel Zak <kzak@redhat.com>
+ * SPDX-License-Identifier: GPL-2.0-or-later
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it would 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.
+ * Copyright (C) 2008 Cai Qian <qcai@redhat.com>
+ * Copyright (C) 2008-2023 Karel Zak <kzak@redhat.com>
*
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * lscpu - CPU architecture information helper
*/
-
#include <assert.h>
#include <ctype.h>
#include <dirent.h>
diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h
index 1a8cfce64b..2c6a1d1c4f 100644
--- a/sys-utils/lscpu.h
+++ b/sys-utils/lscpu.h
@@ -1,3 +1,14 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2013 Ondrej Oprala <ooprala@redhat.com>
+ * Copyright (C) 2013-2023 Karel Zak <kzak@redhat.com>
+ */
#ifndef LSCPU_H
#define LSCPU_H
diff --git a/sys-utils/lsirq.c b/sys-utils/lsirq.c
index ba281a7913..36164c96bb 100644
--- a/sys-utils/lsirq.c
+++ b/sys-utils/lsirq.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
* lsirq - utility to display kernel interrupt information.
*
* Copyright (C) 2019 zhenwei pi <pizhenwei@bytedance.com>
@@ -8,15 +10,6 @@
* 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 library 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <ctype.h>
#include <errno.h>
diff --git a/sys-utils/lsmem.c b/sys-utils/lsmem.c
index 86c912c744..3b5ca19a01 100644
--- a/sys-utils/lsmem.c
+++ b/sys-utils/lsmem.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
* lsmem - Show memory configuration
*
* Copyright IBM Corp. 2016
@@ -8,15 +10,6 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
- * This program is distributed in the hope that it would 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <c.h>
#include <nls.h>
diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
index b66439a4af..e68bdbed46 100644
--- a/sys-utils/lsns.c
+++ b/sys-utils/lsns.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
* lsns(8) - list system namespaces
*
* Copyright (C) 2015 Karel Zak <kzak@redhat.com>
@@ -7,15 +9,6 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
- * This program is distributed in the hope that it would 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, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <string.h>
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 68b57eb36d..50e66de586 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
* mount(8) -- mount a filesystem
*
* Copyright (C) 2011 Red Hat, Inc. All rights reserved.
@@ -8,17 +10,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
- * This program is distributed in the hope that it would 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/sys-utils/mountpoint.c b/sys-utils/mountpoint.c
index cb01f5c02e..8f0b0d5f45 100644
--- a/sys-utils/mountpoint.c
+++ b/sys-utils/mountpoint.c
@@ -1,9 +1,5 @@
/*
- * mountpoint(1) - see if a directory is a mountpoint
- *
- * This is libmount based reimplementation of the mountpoint(1)
- * from sysvinit project.
- *
+ * SPDX-License-Identifier: GPL-2.0-or-later
*
* Copyright (C) 2011 Red Hat, Inc. All rights reserved.
* Written by Karel Zak <kzak@redhat.com>
@@ -13,16 +9,11 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it would 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.
+ * mountpoint(1) - see if a directory is a mountpoint
*
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * This is libmount based reimplementation of the mountpoint(1)
+ * from sysvinit project.
*/
-
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
index c895b031e2..73ada265b2 100644
--- a/sys-utils/nsenter.c
+++ b/sys-utils/nsenter.c
@@ -1,22 +1,14 @@
/*
- * nsenter(1) - command-line interface for setns(2)
- *
- * Copyright (C) 2012-2013 Eric Biederman <ebiederm@xmission.com>
+ * SPDX-License-Identifier: GPL-2.0
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; version 2.
*
- * 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.
+ * Copyright (C) 2012-2023 Eric Biederman <ebiederm@xmission.com>
*
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * nsenter(1) - command-line interface for setns(2)
*/
-
#include <dirent.h>
#include <errno.h>
#include <getopt.h>
diff --git a/sys-utils/pivot_root.c b/sys-utils/pivot_root.c
index 6462a5b95f..e3f084c9f5 100644
--- a/sys-utils/pivot_root.c
+++ b/sys-utils/pivot_root.c
@@ -1,17 +1,12 @@
/*
- * pivot_root.c - Change the root file system
- *
- * Copyright (C) 2000 Werner Almesberger
+ * SPDX-License-Identifier: GPL-2.0-or-later
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This file 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.
+ * Copyright (C) 2000 Werner Almesberger
*/
#include <err.h>
#include <errno.h>
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index 6b33c14eb0..57c11fb4dc 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -1,23 +1,15 @@
/*
- * prlimit - get/set process resource limits.
+ * SPDX-License-Identifier: GPL-2.0-or-later
*
- * Copyright (C) 2011 Davidlohr Bueso <dave@gnu.org>
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Copyright (C) 2011 Davidlohr Bueso <dave@gnu.org>
*
- * 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * prlimit - get/set process resource limits.
*/
-
#include <errno.h>
#include <getopt.h>
#include <stdio.h>
diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c
index e810ea5e1b..3abf6c7279 100644
--- a/sys-utils/readprofile.c
+++ b/sys-utils/readprofile.c
@@ -1,21 +1,14 @@
/*
- * readprofile.c - used to read /proc/profile
+ * SPDX-License-Identifier: GPL-2.0-or-later
*
- * Copyright (C) 1994,1996 Alessandro Rubini (rubini@ipvvis.unipv.it)
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Copyright (C) 1994,1996 Alessandro Rubini (rubini@ipvvis.unipv.it)
*
- * 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * readprofile.c - used to read /proc/profile
*/
/*
diff --git a/sys-utils/renice.c b/sys-utils/renice.c
index b802dc334f..a8cf741139 100644
--- a/sys-utils/renice.c
+++ b/sys-utils/renice.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: BSD-4-Clause-UC
+ *
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
*
diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c
index 56f050b396..167d3a23a6 100644
--- a/sys-utils/rfkill.c
+++ b/sys-utils/rfkill.c
@@ -1,4 +1,6 @@
/*
+ * SPDX-License-Identifier: ISC
+ *
* /dev/rfkill userspace tool
*
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
@@ -19,7 +21,6 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-
#include <ctype.h>
#include <getopt.h>
#include <libsmartcols.h>
diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
index d6a489ecdc..67bbf8ae70 100644
--- a/sys-utils/rtcwake.c
+++ b/sys-utils/rtcwake.c
@@ -1,4 +1,14 @@
/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2007 Bernhard Walle <bwalle@suse.de>
+ * Copyright (C) 2007-2023 Karel Zak <kzak@redhat.com>
+ *
* rtcwake -- enter a system sleep state until specified wakeup time.
*
* This uses cross-platform Linux interfaces to enter a system sleep state,
@@ -18,7 +28,6 @@
* RTC uses a local timezone instead (maybe you dual-boot MS-Windows).
* That flag should not be needed on systems with adjtime support.
*/
-
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
diff --git a/sys-utils/setpgid.c b/sys-utils/setpgid.c
index f89dbb8df9..936991d65b 100644
--- a/sys-utils/setpgid.c
+++ b/sys-utils/setpgid.c
@@ -1,9 +1,9 @@
/*
- * setpgid.c -- execute a command in a new process group
- * Daan De Meyer <daan.j.demeyer@gmail.com>
- * In the public domain.
+ * No copyright is claimed. This code is in the public domain; do with
+ * it what you wish.
+ *
+ * Written by Daan De Meyer <daan.j.demeyer@gmail.com>
*/
-
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/sys-utils/setsid.c b/sys-utils/setsid.c
index b10aaa985b..5ccfd0ff12 100644
--- a/sys-utils/setsid.c
+++ b/sys-utils/setsid.c
@@ -1,7 +1,10 @@
/*
+ * No copyright is claimed. This code is in the public domain; do with
+ * it what you wish.
+ *
+ * Written by Rick Sladkey <jrs@world.std.com>
+ *
* setsid.c -- execute a command in a new session
- * Rick Sladkey <jrs@world.std.com>
- * In the public domain.
*
* 1999-02-22 Arkadiusz Miśkiewicz <misiek@pld.ORG.PL>
* - added Native Language Support
@@ -12,7 +15,6 @@
* 2008-08-20 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* - if forked, wait on child process and emit its return code.
*/
-
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/sys-utils/swapoff.c b/sys-utils/swapoff.c
index aca42b8a4a..62f1374d09 100644
--- a/sys-utils/swapoff.c
+++ b/sys-utils/swapoff.c
@@ -1,3 +1,16 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2012-2023 Karel Zak <kzak@redhat.com>
+ *
+ * Original implementation from Linux 0.99, without License and copyright in
+ * the code. Karel Zak rewrote the code under GPL-2.0-or-later.
+ */
#include <stdio.h>
#include <errno.h>
#include <getopt.h>
diff --git a/sys-utils/swapon-common.c b/sys-utils/swapon-common.c
index ceda783426..a4149a55d9 100644
--- a/sys-utils/swapon-common.c
+++ b/sys-utils/swapon-common.c
@@ -1,4 +1,16 @@
-
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2012-2023 Karel Zak <kzak@redhat.com>
+ *
+ * Original implementation from Linux 0.99, without License and copyright in
+ * the code. Karel Zak rewrote the code under GPL-2.0-or-later.
+ */
#include "c.h"
#include "nls.h"
#include "xalloc.h"
diff --git a/sys-utils/swapon-common.h b/sys-utils/swapon-common.h
index a13c0de75b..4d66a1484f 100644
--- a/sys-utils/swapon-common.h
+++ b/sys-utils/swapon-common.h
@@ -1,3 +1,16 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2012-2023 Karel Zak <kzak@redhat.com>
+ *
+ * Original implementation from Linux 0.99, without License and copyright in
+ * the code. Karel Zak rewrote the code under GPL-2.0-or-later.
+ */
#ifndef UTIL_LINUX_SWAPON_COMMON_H
#define UTIL_LINUX_SWAPON_COMMON_H
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index fa2bf46cdf..ce499c10d7 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -1,3 +1,16 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Copyright (C) 2012-2023 Karel Zak <kzak@redhat.com>
+ *
+ * Original implementation from Linux 0.99, without License and copyright in
+ * the code. Karel Zak rewrote the code under GPL-2.0-or-later.
+ */
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>