diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-08-02 20:03:43 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-08-12 10:14:00 +0300 |
commit | 18a13ef9e1f494cc4ee765ed1cacea894c5c3823 (patch) | |
tree | 5824fc9ab4eed76abb7f18d8f1a6560a0b18d58a | |
parent | Add libk tests (diff) | |
download | kernel-18a13ef9e1f494cc4ee765ed1cacea894c5c3823.tar.xz |
Add LICENSE.md
-rw-r--r-- | LICENSE.md | 16 | ||||
-rw-r--r-- | doc/style.md | 8 | ||||
-rwxr-xr-x | scripts/check-header.py | 23 | ||||
-rw-r--r-- | src/kernel.c | 6 |
4 files changed, 53 insertions, 0 deletions
diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..0610832 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,16 @@ +Copyright (c) 2022 aqua@iserlohn-fortress.net + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +SPDX License Identifier: [ISC](https://spdx.org/licenses/ISC.html) + diff --git a/doc/style.md b/doc/style.md new file mode 100644 index 0000000..28b712d --- /dev/null +++ b/doc/style.md @@ -0,0 +1,8 @@ +## file headers +```c +//===================================================================== +// <component name> +// spdx-license-identifier: ISC +// description: +//===================================================================== +``` diff --git a/scripts/check-header.py b/scripts/check-header.py new file mode 100755 index 0000000..67aea38 --- /dev/null +++ b/scripts/check-header.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import sys +import re + +line_re = [ + r'^\/\/\={69}$', + r'^\/\/ \w+', + r'^\/\/ spdx-license-identifier: (ISC)', + r'^\/\/ description: \w+' +] + +if __name__ == '__main__': + errors = 0 + + with open(sys.argv[1]) as f: + for i in range(len(line_re)): + if re.search(line_re[i], f.readline()) == None: + print(f'wrong license header: {sys.argv[1]}:{i}') + errors += 1 + + if errors != 0: + sys.exit(1) diff --git a/src/kernel.c b/src/kernel.c index b9a6bdf..b652c23 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -1,3 +1,9 @@ +//===================================================================== +// glitch kernel +// spdx-license-identifier: ISC +// description: kernel entry point +//===================================================================== + #include "mem.h" #include <gdt.h> |