Skip to contentSkip to conversation

multipath-tools: move SPDX-License-Identifier to the top of the file

PATCH In review Xose Vazquez Perez 2 participants 3 messages Jan 12 – Jan 15 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: move SPDX-License-Identifier to the top of the file

Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc DM_DEVEL-ML <[email protected]>
---
 libmpathcmd/libmpathcmd.version         | 2 +-
 libmpathpersist/libmpathpersist.version | 2 +-
 libmpathutil/libmpathutil.version       | 2 +-
 libmpathutil/strbuf.c                   | 2 +-
 libmpathutil/strbuf.h                   | 2 +-
 libmultipath/libmultipath.version       | 2 +-
 multipathd/multipathc.c                 | 2 +-
 tests/cli.c                             | 3 +--
 tests/devt.c                            | 3 +--
 tests/mapinfo.c                         | 2 +-
 tests/mpathvalid.c                      | 3 +--
 tests/strbuf.c                          | 2 +-
 tests/sysfs.c                           | 2 +-
 tests/vpd.c                             | 2 +-
 14 files changed, 14 insertions(+), 17 deletions(-)
libmpathcmd/libmpathcmd.version +1 -1
index 81bdb2b7..e672755a 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2020 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-or-later
  *
  * libmpathcmd ABI
  *
libmpathpersist/libmpathpersist.version +1 -1
index e486c5cd..28350417 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2020 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-or-later
  *
  * libmpathpersist ABI
  *
libmpathutil/libmpathutil.version +1 -1
index e0e9ffd7..fe88ca31 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2020 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-or-later
  *
  * libmultipath ABI (libmpathutil part)
  *
libmpathutil/strbuf.c +1 -1
index 491a343a..3ff1413b 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2021 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-or-later
  */
 #include <inttypes.h>
 #include <stdint.h>
libmpathutil/strbuf.h +1 -1
index 790dc233..44818431 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2021 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-or-later
  */
 #ifndef STRBUF_H_INCLUDED
 #define STRBUF_H_INCLUDED
libmultipath/libmultipath.version +1 -1
index 3eee67a8..158e7c50 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2020 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-or-later
  *
  * libmultipath ABI
  *
multipathd/multipathc.c +1 -1
index 38f2d6a3..cb3d6f87 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
 /*
  * Copyright (c) 2022 SUSE LLC
- * SPDX-License-Identifier: GPL-3.0-or-later
  */
 #include <string.h>
 #include <stdio.h>
tests/cli.c +1 -2
index f008d26b..fbcca095 100644
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2020 Martin Wilck, SUSE
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
  */
 #include <stdbool.h>
 #include <stdarg.h>
tests/devt.c +1 -2
index 3b322df9..711947cb 100644
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2020 Martin Wilck, SUSE
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
  */
 #include <stdbool.h>
 #include <stdarg.h>
tests/mapinfo.c +1 -1
index d8461b48..12540f9f 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2024 Martin Wilck, SUSE
- * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
 /*
tests/mpathvalid.c +1 -2
index 1b060fe4..0a70c614 100644
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2020 Benjamin Marzinski, Red Hat
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
  */
 #include <stdbool.h>
 #include <stdarg.h>
tests/strbuf.c +1 -1
index 06fa71c4..8d0beb80 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2021 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-only
  */
 
 #define _GNU_SOURCE
tests/sysfs.c +1 -1
index 5f029427..a3c0a7f7 100644
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2021 SUSE LLC
- * SPDX-License-Identifier: GPL-2.0-only
  */
 
 #define _GNU_SOURCE
tests/vpd.c +1 -1
index 043b6aa7..c0da3769 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright (c) 2019 Martin Wilck, SUSE Linux GmbH, Nuremberg */
 
 #define _GNU_SOURCE
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Xose Vazquez Perez
Cc Martin Wilck <[email protected]>
Cc Benjamin Marzinski <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc DM_DEVEL-ML <[email protected]>

---
 libmpathcmd/libmpathcmd.version         | 2 +-
 libmpathpersist/libmpathpersist.version | 2 +-
 libmpathutil/libmpathutil.version       | 2 +-
 libmpathutil/strbuf.c                   | 2 +-
 libmpathutil/strbuf.h                   | 2 +-
 libmultipath/libmultipath.version       | 2 +-
 multipathd/multipathc.c                 | 2 +-
 tests/cli.c                             | 3 +--
 tests/devt.c                            | 3 +--
 tests/mapinfo.c                         | 2 +-
 tests/mpathvalid.c                      | 3 +--
 tests/strbuf.c                          | 2 +-
 tests/sysfs.c                           | 2 +-
 tests/vpd.c                             | 2 +-

 14 files changed, 14 insertions(+), 17 deletions(-)
libmpathcmd/libmpathcmd.version +0 -0
index 81bdb2b7..e672755a 100644

libmpathcmd/libmpathcmd.version line 1

Quoted 1 line
libmpathcmd/libmpathcmd.version +1 -0
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later

It turns out that the linker doesn't appreciate C++-style comments in linker scripts. I'll fix that, but next time please compile-test your patches.

I'm not sure if the license tag really needs to be in the first line of every file. I only found the recommendation to put it "near the top". Anyway,

[ I thought I'd sent a response to this patch already, but I can't find it any more. Sorry if you get this multiple times. ]

#2 lore raw
Quoted 3 lines · Martin Wilck

It turns out that the linker doesn't appreciate C++-style comments in linker scripts. I'll fix that, but next time please compile-test your patches.

It seemed trivial, I'm sorry.

Quoted 3 lines

I'm not sure if the license tag really needs to be in the first line of every file. I only found the recommendation to put it "near the top". Anyway,

https://www.kernel.org/doc/html/latest/process/license-rules.html#license-identifier-syntax