From 3e2164c7c21d9abdee683096ad58f364166b5507 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Thu, 6 Apr 2023 21:18:56 +0100 Subject: [PATCH] kernel: rename extensions/ to kexts/ --- extensions/hello-world/hello-world.c | 0 {extensions => kexts}/hello-world/extension.yaml | 3 +++ kexts/hello-world/hello-world.c | 8 ++++++++ 3 files changed, 11 insertions(+) delete mode 100644 extensions/hello-world/hello-world.c rename {extensions => kexts}/hello-world/extension.yaml (56%) create mode 100644 kexts/hello-world/hello-world.c diff --git a/extensions/hello-world/hello-world.c b/extensions/hello-world/hello-world.c deleted file mode 100644 index e69de29..0000000 diff --git a/extensions/hello-world/extension.yaml b/kexts/hello-world/extension.yaml similarity index 56% rename from extensions/hello-world/extension.yaml rename to kexts/hello-world/extension.yaml index 1361e43..5de1bf3 100644 --- a/extensions/hello-world/extension.yaml +++ b/kexts/hello-world/extension.yaml @@ -1,4 +1,7 @@ name: hello-world +description: | + A sample kernel extension, demonstrating the structure of a kext. + No actual functionality. id: net.doorstuck.socks.hello-world license: BSD-3-Clause copyright: Copyright © Max Wash 2023 diff --git a/kexts/hello-world/hello-world.c b/kexts/hello-world/hello-world.c new file mode 100644 index 0000000..c90d00c --- /dev/null +++ b/kexts/hello-world/hello-world.c @@ -0,0 +1,8 @@ +#include +#include + +kern_status_t online(struct kext *self) +{ + printk("Hello, world!"); + return KERN_OK; +}