1
0
Files
Andrey Zolotarev e72e9355e3 start the android-4.9 tree
git: https://android.googlesource.com/kernel/common
branch: android-4.9
commit: 03fcc2fe71308c2d164b4e6cbfc738c63e670444
2018-11-15 21:36:32 +03:00

34 lines
753 B
C

/*
* This module emits "Hello, world" on printk when loaded.
*
* It is designed to be used for basic evaluation of the module loading
* subsystem (for example when validating module signing/verification). It
* lacks any extra dependencies, and will not normally be loaded by the
* system unless explicitly requested by name.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/init.h>
#include <linux/module.h>
#include <linux/printk.h>
static int __init test_module_init(void)
{
pr_warn("Hello, world\n");
return 0;
}
module_init(test_module_init);
static void __exit test_module_exit(void)
{
pr_warn("Goodbye\n");
}
module_exit(test_module_exit);
MODULE_AUTHOR("Kees Cook <keescook@chromium.org>");
MODULE_LICENSE("GPL");