test.c
来自「周立功ARM7试验箱」· C语言 代码 · 共 36 行
C
36 行
#ifndef __KERNEL__ #define __KERNEL__#endif#ifndef MODULE #define MODULE#endif#include <linux/module.h>#include <linux/sched.h>#include <linux/kernel.h> /* printk() */#include <linux/init.h>int test_init(void);void test_cleanup(void);module_init(test_init);module_exit(test_cleanup);/********************************************************************************************************/ int test_init(void){ printk(KERN_ERR "test: init OK\n"); return 0; } void test_cleanup(void){ printk(KERN_ERR "test: remove OK\n");}/*********************************************************************************************************** End Of File********************************************************************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?