]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
disk-utils: add SPDX and Copyright notices
authorKarel Zak <kzak@redhat.com>
Wed, 1 Nov 2023 13:47:41 +0000 (14:47 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 24 Nov 2023 10:16:56 +0000 (11:16 +0100)
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 <kzak@redhat.com>
26 files changed:
README.licensing
disk-utils/addpart.c
disk-utils/blockdev.c
disk-utils/cfdisk.c
disk-utils/cramfs.h
disk-utils/cramfs_common.c
disk-utils/delpart.c
disk-utils/fdformat.c
disk-utils/fdisk-list.c
disk-utils/fdisk-list.h
disk-utils/fdisk-menu.c
disk-utils/fdisk.c
disk-utils/fdisk.h
disk-utils/fsck.c
disk-utils/fsck.cramfs.c
disk-utils/fsck.minix.c
disk-utils/isosize.c
disk-utils/minix_programs.h
disk-utils/mkfs.bfs.c
disk-utils/mkfs.c
disk-utils/mkfs.cramfs.c
disk-utils/mkfs.minix.c
disk-utils/mkswap.c
disk-utils/partx.c
disk-utils/resizepart.c
disk-utils/swaplabel.c

index 3258f55b58cb91897102f7a787677ae4c21ee22d..2af64624658118ae7f7776db50338c3c7a4d597a 100644 (file)
@@ -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
 
index 33abb36cab7b487beaf1878c310d04ff09efb709..05861040f722ca3235b290d2c5a14425269feb2a 100644 (file)
@@ -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 <kzak@redhat.com>
+ */
 #include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
index 58ed4df8b8eb12059c727d06ed7a21b6206b44d2..9b1a0b45378884f3788ecedc594bc661e746992e 100644 (file)
@@ -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 <kzak@redhat.com>
  */
-
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdlib.h>
index 3d741c9743995da41c466c9b20035d9df4625c23..fde20295ef9989b6846ec3e0c38d79d93d44d226 100644 (file)
@@ -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-2015 Karel Zak <kzak@redhat.com>
@@ -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 <stdlib.h>
 #include <stdio.h>
index 43bbf526491cbc3e0f6494b188a17f78f82f6bc4..322dbf38af0c79c6af64f28f3202366d26337088 100644 (file)
@@ -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
 
index 9fe3fa10550925ebdfbb478fefc92194cd0ec2e3..400b146cd4ba4cc8cd674a3a5c717a422262eabb 100644 (file)
@@ -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
index 7ee0c525f0531c5429c757b376d425370854afa0..497dcc9401a5b7b27a865da6fbaafa64fe25234b 100644 (file)
@@ -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 <kzak@redhat.com>
+ */
 #include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
index 23609adf988c90a19497eaab3e8bd1137654eaf3..871bb075bc61418eec01f7abde61900e9b2fc735 100644 (file)
@@ -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 <errno.h>
index 21d215e5844a85c3ea6f61bf6348c953ad9cec9f..f93ed10e1b375c23b5c947284dc0450cfe07b57c 100644 (file)
@@ -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 <kzak@redhat.com>
+ */
 #include <libfdisk.h>
 #include <libsmartcols.h>
 #include <assert.h>
index 6c7552892815ae3a5bc481875ff3fd2bce5765a8..a30cd6a5159c4e082c05d257ef95a32f1c3a7951 100644 (file)
@@ -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 <kzak@redhat.com>
+ */
 #ifndef UTIL_LINUX_FDISK_LIST_H
 #define UTIL_LINUX_FDISK_LIST_H
 
index 52282dde614b8665dd996ba8009ccc21b568f624..5cf00026ae377b5d8a2e0d6d16b9f2ea5073c09d 100644 (file)
@@ -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 <kzak@redhat.com>
+ */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 79b904f2535efa8255f6b5579e414a1f262b9c5b..6bf3efbbe802e27b0bf82e54a66ad726c4b4b1b9 100644 (file)
@@ -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 <dave@gnu.org>
  *
  * Copyright (C) 2007-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 General Public License as
- * published by the Free Software Foundation: either version 1 or
- * (at your option) any later version.
  */
 #include <unistd.h>
 #include <stdio.h>
index e1147e20bfdec0a508135ccf64b98da6d0ef8c57..e7edc0651e708d0f8009567874a9e31816a79c0a 100644 (file)
@@ -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 <kzak@redhat.com>
+ */
 #ifndef UTIL_LINUX_FDISK_H
 #define UTIL_LINUX_FDISK_H
 /*
index 1b11e82614d336534e4b1b21d1fe9023a6b2d387..57e0758b953e95e287cef2ca72b669e03af9c34b 100644 (file)
@@ -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
  *              2001, 2002, 2003, 2004, 2005 by  Theodore Ts'o.
  *
  * Copyright (C) 2009-2014 Karel Zak <kzak@redhat.com>
- *
- * 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 <sys/types.h>
index 10711200a2a602dbd1a67464af4ff83d8d61c3c7..544608436416b3726d8cf5e2d008c9dd7561dff7 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
  * cramfsck - check a cramfs file system
  *
  * Copyright (C) 2000-2002 Transmeta Corporation
index bd44f5bd12e8fe5f0cfb39ff0e6b5c3ba6c76fae..66b46d4ab0224010213b147380a52186773b0d83 100644 (file)
@@ -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.
index 92996635684310a145330326ef66e1c2b4d1980e..cfcb985ab727c72195a7426c3ed2b723a8d41e15 100644 (file)
@@ -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 <kzak@redhat.com>
  *
  * use header info to find size of iso9660 file system
  * output a number - useful in scripts
@@ -16,7 +24,6 @@
  *     - add "-d <num>" option and use long long to fix things > 2 GB
  *  Version 2.02 2000/10/11
  *     - error messages on IO failures [D. Gilbert]
- *
  */
 #include <stdio.h>
 #include <stdlib.h>
index 7ad308d3cc7af66c7475342e530b73fcf52b6418..2bb311ceefbc42318290c69c92da5ae9a3b0cea7 100644 (file)
@@ -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 <kerolasa@iki.fi>
+ */
 #ifndef UTIL_LINUX_MINIX_PROGRAMS_H
 #define UTIL_LINUX_MINIX_PROGRAMS_H
 
index 40f00105e5cba004b11bea89f1246b0b5e200021..06271a79ce7110bf47f210dc0cc7ca2c39dbc422 100644 (file)
@@ -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 <errno.h>
 #include <fcntl.h>
 #include <getopt.h>
index d6fada4ad45a0c9274b5b01337a562d94165c243..4254ef0967ca2eefbc55d4bb182e63b194d356e8 100644 (file)
@@ -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, <david@ods.com>
- *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *             Ron Sommeling, <sommel@sci.kun.nl>
+ * Copyright (C) David Engel, <david@ods.com>
+ * Copyright (C) Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
+ * Copyright (C) Ron Sommeling, <sommel@sci.kun.nl>
  *
  * Mon Jul  1 18:52:58 1996: janl@math.uio.no (Nicolai Langfeldt):
  *     Incorporated fix by Jonathan Kamens <jik@annex-1-slip-jik.cam.ov.com>
index ca1d0410c0be77d1df4e4951001391e7724bb91d..fcc131415205759c6e379cef3ceda82fa4413dad 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
  * mkcramfs - make a cramfs file system
  *
  * Copyright (C) 1999-2002 Transmeta Corporation
index 4a8308ade4ed07998b6958a934a65076fa195bfc..08263adef8cb61d60d5c2fdc74c08b06c3a41554 100644 (file)
@@ -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.
index bd02301774535a0084638d86120e5291906351a5..30c4ea89bfe5110864799daa73b441998f1ad4ea 100644 (file)
@@ -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
index 76872907fe74012dbc058069ce12202db906a355..8078e9c12519d8d30624ba096dac1f67c071bc46 100644 (file)
@@ -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 <kzak@redhat.com>
  */
-
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
index b2738271e25da14c3cf4f82d234f6c123c9ebc5d..8c34f8ac33b088872b64ad358a9a1049b83e140d 100644 (file)
@@ -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 <kzak@redhat.com>
+ */
 #include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
index e6ba7d66d7f12f57e87f158decc659276cb5f4cc..8498d2ea64b268b431d3c38cde0ea6ebf27c34d2 100644 (file)
@@ -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 <jborden@bluehost.com>