From a8fe6cce286a2dddd73e7cf6e31f526812c0d00f Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sun, 8 Oct 2017 22:19:48 +0100 Subject: [PATCH] Add userland hello world sanity check --- kernel_module/user/README.md | 1 + kernel_module/user/hello.c | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 kernel_module/user/hello.c diff --git a/kernel_module/user/README.md b/kernel_module/user/README.md index 8e04599..ddc6627 100644 --- a/kernel_module/user/README.md +++ b/kernel_module/user/README.md @@ -9,6 +9,7 @@ C programs require cross compiling, but give us more control over system calls. These programs can also be compiled and used on host. 1. Standalone + 1. [hello](hello.c) 1. [myinsmod](myinsmod.c) 1. [myrmmod](myrmmod.c) 1. [usermem](usermem.c) diff --git a/kernel_module/user/hello.c b/kernel_module/user/hello.c new file mode 100644 index 0000000..7a63575 --- /dev/null +++ b/kernel_module/user/hello.c @@ -0,0 +1,7 @@ +#include +#include + +int main(void) { + puts("hello"); + return EXIT_SUCCESS; +}