📄 hello.c
字号:
/* * $Id: hello.c,v 1.10 2001/07/17 10:30:02 rubini Exp $ */ #ifndef __KERNEL__# define __KERNEL__#endif#ifndef MODULE# define MODULE#endif#include <linux/module.h>EXPORT_NO_SYMBOLS;//EXPORT_SYMTAB;//EXPORT_SYMBOL (redflag);//EXPORT_SYMBOL_NOVERS (redflag);MODULE_AUTHOR("redflag nankai university");MODULE_DESCRIPTION("Hello world!");MODULE_LICENSE("GPL");/* * These lines, although not shown in the book, * are needed to make hello.c run properly even when * your kernel has version support enabled */ int init_module(void) { printk("<1>Hello, world\n"); return 0; }void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -