From: Karel Zak Date: Wed, 1 Nov 2023 13:47:41 +0000 (+0100) Subject: disk-utils: add SPDX and Copyright notices X-Git-Tag: v2.40-rc1~174 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e95aa1298d67331cab00f385d7e0cb9c64a263b;p=thirdparty%2Futil-linux.git disk-utils: add SPDX and Copyright notices Explicitly state the license (usually GPL-2.0-or-later; our default) and include copyright statements in all files to prevent false positive reports from license analysis tools. Add also add SPDX-License-Identifier tag to all files. Signed-off-by: Karel Zak --- diff --git a/README.licensing b/README.licensing index 3258f55b58..2af6462465 100644 --- a/README.licensing +++ b/README.licensing @@ -2,11 +2,13 @@ The project util-linux doesn't use the same license for all of the code. There is code under: - * GPL-3.0-or-later - GNU General Public License version 3, or any later version + * GPL-1.0-or-later - GNU General Public License version 1, or any later version + + * GPL-2.0 - GNU General Public License version 2 * GPL-2.0-or-later - GNU General Public License version 2, or any later version - * GPL-2.0 - GNU General Public License version 2 + * GPL-3.0-or-later - GNU General Public License version 3, or any later version * LGPL-2.1-or-later - GNU Lesser General Public License 2.1 or any later version diff --git a/disk-utils/addpart.c b/disk-utils/addpart.c index 2cf664b98f..6bdb336628 100644 --- a/disk-utils/addpart.c +++ b/disk-utils/addpart.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) 2012-2023 Karel Zak + */ #include #include #include diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index 22497d23ad..92c02602b7 100644 --- a/disk-utils/blockdev.c +++ b/disk-utils/blockdev.c @@ -1,8 +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. + * * blockdev.c --- Do various simple block device ioctls from the command line * aeb, 991028 + * + * Copyright (C) 2007-2023 Karel Zak */ - #include #include #include diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 01069b7af2..9cf0346425 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -1,4 +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. + * * cfdisk.c - Display or manipulate a disk partition table. * * Copyright (C) 2014-2023 Karel Zak @@ -6,11 +13,6 @@ * * The original cfdisk was inspired by the fdisk program * by A. V. Le Blanc (leblanc@mcc.ac.uk. - * - * cfdisk 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. */ #include #include diff --git a/disk-utils/cramfs.h b/disk-utils/cramfs.h index 43bbf52649..322dbf38af 100644 --- a/disk-utils/cramfs.h +++ b/disk-utils/cramfs.h @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * * cramfs_common - cramfs common code * * Copyright (c) 2008 Roy Peled, the.roy.peled -at- gmail @@ -13,9 +15,7 @@ * 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. - * */ - #ifndef __CRAMFS_H #define __CRAMFS_H diff --git a/disk-utils/cramfs_common.c b/disk-utils/cramfs_common.c index 9fe3fa1055..400b146cd4 100644 --- a/disk-utils/cramfs_common.c +++ b/disk-utils/cramfs_common.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * * cramfs_common - cramfs common code * * Copyright (c) 2008 Roy Peled, the.roy.peled -at- gmail.com diff --git a/disk-utils/delpart.c b/disk-utils/delpart.c index cd6bf5c55d..85060699ce 100644 --- a/disk-utils/delpart.c +++ b/disk-utils/delpart.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) 2012-2023 Karel Zak + */ #include #include #include diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c index e776a278d7..ccd3942a8b 100644 --- a/disk-utils/fdformat.c +++ b/disk-utils/fdformat.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) 1992 Werner Almesberger + * * fdformat.c - Low-level formats a floppy disk - Werner Almesberger */ #include diff --git a/disk-utils/fdisk-list.c b/disk-utils/fdisk-list.c index 4080b757d3..26ae1bd1eb 100644 --- a/disk-utils/fdisk-list.c +++ b/disk-utils/fdisk-list.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) 2014 Karel Zak + */ #include #include #include diff --git a/disk-utils/fdisk-list.h b/disk-utils/fdisk-list.h index 6c75528928..a30cd6a515 100644 --- a/disk-utils/fdisk-list.h +++ b/disk-utils/fdisk-list.h @@ -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) 2014-2023 Karel Zak + */ #ifndef UTIL_LINUX_FDISK_LIST_H #define UTIL_LINUX_FDISK_LIST_H diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c index 52282dde61..5cf00026ae 100644 --- a/disk-utils/fdisk-menu.c +++ b/disk-utils/fdisk-menu.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) 2014 Karel Zak + */ #include #include #include diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index c5c5f0fc71..7c04cb5ff7 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -1,13 +1,15 @@ /* + * SPDX-License-Identifier: GPL-1.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 1 of the License, or + * (at your option) any later version. + * * Copyright (C) 1992 A. V. Le Blanc (LeBlanc@mcc.ac.uk) * Copyright (C) 2012 Davidlohr Bueso * * Copyright (C) 2007-2013 Karel Zak - * - * 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 1 or - * (at your option) any later version. */ #include #include diff --git a/disk-utils/fdisk.h b/disk-utils/fdisk.h index e1147e20bf..e7edc0651e 100644 --- a/disk-utils/fdisk.h +++ b/disk-utils/fdisk.h @@ -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) 2014-2023 Karel Zak + */ #ifndef UTIL_LINUX_FDISK_H #define UTIL_LINUX_FDISK_H /* diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c index 49f1b995d7..2a54dc5d1c 100644 --- a/disk-utils/fsck.c +++ b/disk-utils/fsck.c @@ -1,4 +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. + * * fsck --- A generic, parallelizing front-end for the fsck program. * It will automatically try to run fsck programs in parallel if the * devices are on separate spindles. It is based on the same ideas as @@ -20,11 +28,7 @@ * 2001, 2002, 2003, 2004, 2005 by Theodore Ts'o. * * Copyright (C) 2009-2014 Karel Zak - * - * This file may be redistributed under the terms of the GNU Public - * License. */ - #define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */ #include diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c index 789a9b5cfa..b5d64c36aa 100644 --- a/disk-utils/fsck.cramfs.c +++ b/disk-utils/fsck.cramfs.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * * cramfsck - check a cramfs file system * * Copyright (C) 2000-2002 Transmeta Corporation diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c index 11b10562cc..03a47460ec 100644 --- a/disk-utils/fsck.minix.c +++ b/disk-utils/fsck.minix.c @@ -1,11 +1,17 @@ /* + * 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. + * * fsck.minix.c - a file system consistency checker for Linux. * * (C) 1991, 1992 Linus Torvalds. This file may be redistributed * as per the GNU copyleft. - */ - -/* + * + * * 09.11.91 - made the first rudimentary functions * * 10.11.91 - updated, does checking, no repairs yet. diff --git a/disk-utils/isosize.c b/disk-utils/isosize.c index bd74e93d03..a0b2b87cdc 100644 --- a/disk-utils/isosize.c +++ b/disk-utils/isosize.c @@ -1,5 +1,13 @@ /* - * isosize.c - Andries Brouwer, 000608 + * 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) 2000 Andries Brouwer + * Copyright (C) 2023 Karel Zak * * use header info to find size of iso9660 file system * output a number - useful in scripts @@ -16,7 +24,6 @@ * - add "-d " option and use long long to fix things > 2 GB * Version 2.02 2000/10/11 * - error messages on IO failures [D. Gilbert] - * */ #include #include diff --git a/disk-utils/minix_programs.h b/disk-utils/minix_programs.h index 7ad308d3cc..2bb311ceef 100644 --- a/disk-utils/minix_programs.h +++ b/disk-utils/minix_programs.h @@ -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) 2011 Sami Kerola + */ #ifndef UTIL_LINUX_MINIX_PROGRAMS_H #define UTIL_LINUX_MINIX_PROGRAMS_H diff --git a/disk-utils/mkfs.bfs.c b/disk-utils/mkfs.bfs.c index 866776b7d7..895a1f27b7 100644 --- a/disk-utils/mkfs.bfs.c +++ b/disk-utils/mkfs.bfs.c @@ -1,9 +1,17 @@ /* - * mkfs.bfs - Create SCO BFS filesystem - aeb, 1999-09-07 + * SPDX-License-Identifier: GPL-2.0-or-later * - * Usage: mkfs.bfs [-N nr-of-inodes] [-V volume-name] [-F fsname] device + * 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. + * + * mkfs.bfs - Create SCO BFS filesystem - aeb, 1999-09-07 + * + * Copyright (C) 1999 Andries E. Brouwe + * + * Usage: mkfs.bfs [-N nr-of-inodes] [-V volume-name] [-F fsname] device */ - #include #include #include diff --git a/disk-utils/mkfs.c b/disk-utils/mkfs.c index 58856d8716..00d224f9b4 100644 --- a/disk-utils/mkfs.c +++ b/disk-utils/mkfs.c @@ -1,10 +1,17 @@ /* + * 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. + * * mkfs A simple generic frontend for the mkfs program * under Linux. See the manual page for details. * - * Authors: David Engel, - * Fred N. van Kempen, - * Ron Sommeling, + * Copyright (C) David Engel, + * Copyright (C) Fred N. van Kempen, + * Copyright (C) Ron Sommeling, * * Mon Jul 1 18:52:58 1996: janl@math.uio.no (Nicolai Langfeldt): * Incorporated fix by Jonathan Kamens diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 4823753519..840ec8d558 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * * mkcramfs - make a cramfs file system * * Copyright (C) 1999-2002 Transmeta Corporation diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 334f07fc0a..f6f2f48961 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -1,11 +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. * mkfs.minix.c - make a linux (minix) file-system. * * (C) 1991 Linus Torvalds. This file may be redistributed as per * the Linux copyright. - */ - -/* +* * DD.MM.YY * * 24.11.91 - Time began. Used the fsck sources to get started. diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 3d988b7376..9280af1262 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -1,4 +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. + * * mkswap.c - set up a linux swap device * * Copyright (C) 1991 Linus Torvalds diff --git a/disk-utils/partx.c b/disk-utils/partx.c index dc6bac33bc..b0d552c3cf 100644 --- a/disk-utils/partx.c +++ b/disk-utils/partx.c @@ -1,4 +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. + * + * * partx: tell the kernel about your disk's partitions * [This is not an fdisk - adding and removing partitions * is not a change of the disk, but just telling the kernel @@ -10,7 +18,6 @@ * Rewritten to use libblkid for util-linux * based on ideas from Karel Zak */ - #include #include #include diff --git a/disk-utils/resizepart.c b/disk-utils/resizepart.c index df5ee73069..e29021b375 100644 --- a/disk-utils/resizepart.c +++ b/disk-utils/resizepart.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) 2012 Karel Zak + */ #include #include #include diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c index b804a92bc3..6b5078677f 100644 --- a/disk-utils/swaplabel.c +++ b/disk-utils/swaplabel.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * * swaplabel.c - Print or change the label / UUID of a swap partition * * Copyright (C) 2010 Jason Borden