kernel: add second example kext for dependency test
This commit is contained in:
@@ -6,4 +6,4 @@ id: net.doorstuck.socks.hello-world
|
|||||||
license: BSD-3-Clause
|
license: BSD-3-Clause
|
||||||
copyright: Copyright © Max Wash 2023
|
copyright: Copyright © Max Wash 2023
|
||||||
sources:
|
sources:
|
||||||
- hello-world.c
|
- main.c
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <socks/printk.h>
|
#include <socks/printk.h>
|
||||||
#include <socks/kext.h>
|
#include <socks/kext.h>
|
||||||
|
|
||||||
kern_status_t online(struct kext *self)
|
static kern_status_t online(struct kext *self)
|
||||||
{
|
{
|
||||||
printk("Hello, world!");
|
printk("Hello, world!");
|
||||||
return KERN_OK;
|
return KERN_OK;
|
||||||
@@ -9,4 +9,4 @@ kern_status_t online(struct kext *self)
|
|||||||
|
|
||||||
DEFINE_KEXT("net.doorstuck.socks.hello-world",
|
DEFINE_KEXT("net.doorstuck.socks.hello-world",
|
||||||
online, NULL,
|
online, NULL,
|
||||||
"net.doorstuck.socks-kernel");
|
"net.doorstuck.socks.test-base");
|
||||||
9
kexts/test-base/extension.yaml
Normal file
9
kexts/test-base/extension.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
name: test-base
|
||||||
|
description: |
|
||||||
|
A sample kernel extension, demonstrating the structure of a kext.
|
||||||
|
No actual functionality.
|
||||||
|
id: net.doorstuck.socks.test-base
|
||||||
|
license: BSD-3-Clause
|
||||||
|
copyright: Copyright © Max Wash 2023
|
||||||
|
sources:
|
||||||
|
- main.c
|
||||||
12
kexts/test-base/main.c
Normal file
12
kexts/test-base/main.c
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#include <socks/printk.h>
|
||||||
|
#include <socks/kext.h>
|
||||||
|
|
||||||
|
static kern_status_t online(struct kext *self)
|
||||||
|
{
|
||||||
|
printk("Kernel extension base online");
|
||||||
|
return KERN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINE_KEXT("net.doorstuck.socks.test-base",
|
||||||
|
online, NULL,
|
||||||
|
KEXT_NO_DEPENDENCIES);
|
||||||
Reference in New Issue
Block a user