From: Keith Busch Date: Wed, 12 Feb 2020 15:19:13 +0000 (+0900) Subject: Add licence tags, copyright, and author comments X-Git-Tag: v1.0-rc0~176 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c79ae91a5d4ed5013de2c807fe560a9253ff0fc1;p=users%2Fsagi%2Flibnvme.git Add licence tags, copyright, and author comments Signed-off-by: Keith Busch --- diff --git a/Makefile b/Makefile index f1974963..32bc5afc 100644 --- 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 e54c8e8b..1b40be2e 100644 --- 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 diff --git a/examples/discover-loop.c b/examples/discover-loop.c index 6b9d01ff..2aaa9b61 100644 --- a/examples/discover-loop.c +++ b/examples/discover-loop.c @@ -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 + */ + /** * 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 diff --git a/examples/display-columnar.c b/examples/display-columnar.c index 014c8dc4..283f073e 100644 --- a/examples/display-columnar.c +++ b/examples/display-columnar.c @@ -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 + */ + /** * display-columnar: Scans the nvme topology, prints each record type in a * column format for easy visual scanning. diff --git a/examples/display-tree.c b/examples/display-tree.c index 9d00da27..58520dfd 100644 --- a/examples/display-tree.c +++ b/examples/display-tree.c @@ -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 + */ + /** * display-tree: Scans the nvme topology, prints as an ascii tree with some * selected attributes for each component. diff --git a/examples/telemetry-listen.c b/examples/telemetry-listen.c index 00c43f7b..1bc250b5 100644 --- a/examples/telemetry-listen.c +++ b/examples/telemetry-listen.c @@ -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 + */ + /** * 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 diff --git a/src/Makefile b/src/Makefile index 03e5abc5..57b56242 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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) diff --git a/src/libnvme.h b/src/libnvme.h index 2a04bf8b..1b648fea 100644 --- a/src/libnvme.h +++ b/src/libnvme.h @@ -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 + * Chaitanya Kulkarni + */ + #ifndef _LIBNVME_H #define _LIBNVME_H diff --git a/src/nvme/fabrics.c b/src/nvme/fabrics.c index 1eeeac35..19a0dc6b 100644 --- a/src/nvme/fabrics.c +++ b/src/nvme/fabrics.c @@ -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 + * Chaitanya Kulkarni + */ + #include #include #include diff --git a/src/nvme/fabrics.h b/src/nvme/fabrics.h index d7941362..702dd926 100644 --- a/src/nvme/fabrics.h +++ b/src/nvme/fabrics.h @@ -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 + * Chaitanya Kulkarni + */ #ifndef _LIBNVME_FABRICS_H #define _LIBNVME_FABRICS_H diff --git a/src/nvme/filters.c b/src/nvme/filters.c index 2579403b..336254f5 100644 --- a/src/nvme/filters.c +++ b/src/nvme/filters.c @@ -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 + * Chaitanya Kulkarni + */ #include #include #include diff --git a/src/nvme/filters.h b/src/nvme/filters.h index 0c6df916..6f7e8579 100644 --- a/src/nvme/filters.h +++ b/src/nvme/filters.h @@ -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 + */ + #ifndef _LIBNVME_FILTERS_H #define _LIBNVME_FILTERS_H diff --git a/src/nvme/ioctl.c b/src/nvme/ioctl.c index 6105f443..233dea4a 100644 --- a/src/nvme/ioctl.c +++ b/src/nvme/ioctl.c @@ -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 + * Chaitanya Kulkarni + */ #include #include #include diff --git a/src/nvme/ioctl.h b/src/nvme/ioctl.h index 16716216..9287ad68 100644 --- a/src/nvme/ioctl.h +++ b/src/nvme/ioctl.h @@ -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 + * Chaitanya Kulkarni + */ + #ifndef _LIBNVME_IOCTL_H #define _LIBNVME_IOCTL_H #include - #include "types.h" /* diff --git a/src/nvme/tree.c b/src/nvme/tree.c index 79dced51..de0cd4d7 100644 --- a/src/nvme/tree.c +++ b/src/nvme/tree.c @@ -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 + * Chaitanya Kulkarni + */ #include #include #include diff --git a/src/nvme/tree.h b/src/nvme/tree.h index a37541ab..9023ee9e 100644 --- a/src/nvme/tree.h +++ b/src/nvme/tree.h @@ -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 + * Chaitanya Kulkarni + */ + #ifndef _LIBNVME_TREE_H #define _LIBNVME_TREE_H diff --git a/src/nvme/types.h b/src/nvme/types.h index 179510de..34b3ebe3 100644 --- a/src/nvme/types.h +++ b/src/nvme/types.h @@ -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 + * Chaitanya Kulkarni + */ + #ifndef _LIBNVME_TYPES_H #define _LIBNVME_TYPES_H diff --git a/src/nvme/util.c b/src/nvme/util.c index 8870dd1c..4bf9af22 100644 --- a/src/nvme/util.c +++ b/src/nvme/util.c @@ -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 + * Chaitanya Kulkarni + */ + #include #include #include diff --git a/src/nvme/util.h b/src/nvme/util.h index e3cff30d..a9206810 100644 --- a/src/nvme/util.h +++ b/src/nvme/util.h @@ -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 + * Chaitanya Kulkarni + */ #ifndef _LIBNVME_UTIL_H #define _LIBNVME_UTIL_H diff --git a/test/cpp.cc b/test/cpp.cc index f294d001..eb48b78e 100644 --- a/test/cpp.cc +++ b/test/cpp.cc @@ -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 + */ + #include #include @@ -35,6 +43,7 @@ int main() } } std::cout << "\n"; + nvme_free_tree(r); return 0; } diff --git a/test/test.c b/test/test.c index 64a7febe..89925545 100644 --- a/test/test.c +++ b/test/test.c @@ -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 + */ + /** * Basic libnvme test: uses scan filters, single controllers, and many admin * command APIs for identifications, logs, and features. No verification for