Version:  2.0.40 2.2.26 2.4.37 3.13 3.14 3.15 3.16 3.17 3.18 3.19 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10

Linux/lib/test_module.c

  1 /*
  2  * This module emits "Hello, world" on printk when loaded.
  3  *
  4  * It is designed to be used for basic evaluation of the module loading
  5  * subsystem (for example when validating module signing/verification). It
  6  * lacks any extra dependencies, and will not normally be loaded by the
  7  * system unless explicitly requested by name.
  8  */
  9 
 10 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 11 
 12 #include <linux/init.h>
 13 #include <linux/module.h>
 14 #include <linux/printk.h>
 15 
 16 static int __init test_module_init(void)
 17 {
 18         pr_warn("Hello, world\n");
 19 
 20         return 0;
 21 }
 22 
 23 module_init(test_module_init);
 24 
 25 static void __exit test_module_exit(void)
 26 {
 27         pr_warn("Goodbye\n");
 28 }
 29 
 30 module_exit(test_module_exit);
 31 
 32 MODULE_AUTHOR("Kees Cook <keescook@chromium.org>");
 33 MODULE_LICENSE("GPL");
 34 

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us