]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Add licence tags, copyright, and author comments
authorKeith Busch <kbusch@kernel.org>
Wed, 12 Feb 2020 15:19:13 +0000 (00:19 +0900)
committerKeith Busch <kbusch@kernel.org>
Wed, 12 Feb 2020 15:19:13 +0000 (00:19 +0900)
Signed-off-by: Keith Busch <kbusch@kernel.org>
21 files changed:
Makefile
README
examples/discover-loop.c
examples/display-columnar.c
examples/display-tree.c
examples/telemetry-listen.c
src/Makefile
src/libnvme.h
src/nvme/fabrics.c
src/nvme/fabrics.h
src/nvme/filters.c
src/nvme/filters.h
src/nvme/ioctl.c
src/nvme/ioctl.h
src/nvme/tree.c
src/nvme/tree.h
src/nvme/types.h
src/nvme/util.c
src/nvme/util.h
test/cpp.cc
test/test.c

index f197496306e298ce1f254dba8654d08e411968bd..32bc5afca13c8261dc227fa3f50c82eb07056642 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,7 @@ install-tests:
        @$(MAKE) -C test install prefix=$(DESTDIR)$(prefix) datadir=$(DESTDIR)$(datadir)
 
 clean:
-       @rm -f config-host.mak config-host.h cscope.out cscope.files $(NAME).pc
+       @rm -f config-host.mak config-host.h cscope.out $(NAME).pc
        @$(MAKE) -C src clean
        @$(MAKE) -C test clean
        @$(MAKE) -C examples clean
diff --git a/README b/README
index e54c8e8bd86ac6b17d11b9d11f4e5cf36970d835..1b40be2ea15e0980ba604d009f5c22675373534e 100644 (file)
--- a/README
+++ b/README
@@ -20,7 +20,7 @@ and development for both kernel and userspace. The list is archived here:
 License
 -------
 
-All software contained within this repo is currently licensed LGPL, see
-COPYING for more information.
+Except where otherwise stated, all software contained within this repo is
+currently licensed LGPL, see COPYING for more information.
 
 Keith Busch 2020-02-06
index 6b9d01ff0ae3469432a5989d9337633d61ea085e..2aaa9b6137c019a30e7d5952143f960d3519a4a9 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ */
+
 /**
  * discover-loop: Use fabrics commands to discover any loop targets and print
  * those records. You must have at least one configured nvme loop target on the
index 014c8dc44de34e838918658793a0f79e6c4370b5..283f073e44b4de3a0673489a43addbd88cf62584 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ */
+
 /**
  * display-columnar: Scans the nvme topology, prints each record type in a
  * column format for easy visual scanning.
index 9d00da2791e0e71a749fe384a0abdac738f7fa7c..58520dfd96ffde210925a89439a92b9847587fde 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ */
+
 /**
  * display-tree: Scans the nvme topology, prints as an ascii tree with some
  * selected attributes for each component.
index 00c43f7bef7fa32d420c5b5705fe627aa85775f4..1bc250b537c1b079f8c81438ac1e63b3b87a236c 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ */
+
 /**
  * Open all nvme controller's uevent and listen for changes. If NVME_AEN event
  * is observed with controller telemetry data, read the log and save it to a
index 03e5abc5504a3e60844d98651b27801a1d2f7f62..57b562425ebf35eff0dd8b198f6afa08ccac2fc5 100644 (file)
@@ -8,7 +8,7 @@ libdir ?= $(prefix)/lib
 
 CCANDIR=ccan/
 
-CFLAGS ?= -g -fomit-frame-pointer -O2 -I/usr/include -Invme/ -I$(CCANDIR) -include ../config-host.h
+CFLAGS ?= -g -fomit-frame-pointer -O2 -I/usr/include -Invme/ -I$(CCANDIR) -include ../config-host.h -D_GNU_SOURCE
 override CFLAGS += -Wall -fPIC
 SO_CFLAGS=-shared $(CFLAGS)
 L_CFLAGS=$(CFLAGS)
index 2a04bf8b4642363efbeedb629e1c3ec59c5a4719..1b648feab9002aa1c0600f0bc2a57bd3714d1df4 100644 (file)
@@ -1,3 +1,12 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
+
 #ifndef _LIBNVME_H
 #define _LIBNVME_H
 
index 1eeeac355b2b93676fe5f6509fd43d77ecaa731b..19a0dc6bf537de2b87a295c843e01be81c2b340c 100644 (file)
@@ -1,4 +1,12 @@
-#define _GNU_SOURCE
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
+
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
index d79413622432e841dc2a65d02348b016939f9903..702dd926acb213a9e74e1808b1c5d66eb760ea3f 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
 #ifndef _LIBNVME_FABRICS_H
 #define _LIBNVME_FABRICS_H
 
index 2579403b6bd5ecce65969986549d65119517a2b1..336254f58b16e1f2de357a5d543fb8e9c66235fa 100644 (file)
@@ -1,4 +1,11 @@
-#define _GNU_SOURCE
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 0c6df916674d995c1de54a84bd03fd288faa8bd2..6f7e8579a580f1b1861c7048ee516c2d640d93a9 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ */
+
 #ifndef _LIBNVME_FILTERS_H
 #define _LIBNVME_FILTERS_H
 
index 6105f443cfdc521076b865c4974c52a5d496cdaf..233dea4aab671c9a0180d0c86324f50d8792b8a0 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
 #include <errno.h>
 #include <fcntl.h>
 #include <stdint.h>
index 167162164e778406ae0b7ab83d1601ff569d32ae..9287ad68ccdde47b42aa1050e9133e3a4ea1edf6 100644 (file)
@@ -1,8 +1,16 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
+
 #ifndef _LIBNVME_IOCTL_H
 #define _LIBNVME_IOCTL_H
 
 #include <sys/ioctl.h>
-
 #include "types.h"
 
 /*
index 79dced51ee0d2c2a36c975597398a0104afdc294..de0cd4d7b9b9e8c84ac232fc7816621e3def9597 100644 (file)
@@ -1,4 +1,11 @@
-#define _GNU_SOURCE
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
 #include <dirent.h>
 #include <errno.h>
 #include <stdint.h>
index a37541ab89319c36ac095996a7cd6b1725fe5b3c..9023ee9ef17e7817e9f6db785ca454258149abb7 100644 (file)
@@ -1,3 +1,12 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
+
 #ifndef _LIBNVME_TREE_H
 #define _LIBNVME_TREE_H
 
index 179510de8a00f90c027f8fd81a4b3c1c155ec8ea..34b3ebe31c536ba13123aedde7049651f12b29f6 100644 (file)
@@ -1,3 +1,12 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
+
 #ifndef _LIBNVME_TYPES_H
 #define _LIBNVME_TYPES_H
 
index 8870dd1c2e23e3e6375c2c5815419570734778fe..4bf9af22d71fb92c7803b68c7ccc433b3a0ebcb4 100644 (file)
@@ -1,4 +1,12 @@
-#define _GNU_SOURCE
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
+
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
index e3cff30dfcb026dd1a65390e731bbc77201f7d0e..a920681071ed36f1287664830dce308bd11d30f7 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ *         Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+ */
 #ifndef _LIBNVME_UTIL_H
 #define _LIBNVME_UTIL_H
 
index f294d00144a7dcc8234f726b110100528e7b8b0a..eb48b78e3a3a7dd6f37703b49aef81ea54d918c0 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ */
+
 #include <iostream>
 #include <libnvme.h>
 
@@ -35,6 +43,7 @@ int main()
                }
        }
        std::cout << "\n";
+       nvme_free_tree(r);
 
        return 0;
 }
index 64a7febe28f7b5d6c3cf4c26ff47e5365dfcb215..8992554531ad27bea2fbc9a6603b4961d20a9ce1 100644 (file)
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/**
+ * This file is part of libnvme.
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors: Keith Busch <keith.busch@wdc.com>
+ */
+
 /**
  * Basic libnvme test: uses scan filters, single controllers, and many admin
  * command APIs for identifications, logs, and features. No verification for