首页 > 学院 > 开发设计 > 正文

内核驱动hello world模块

2019-11-08 02:40:46
字体:
来源:转载
供稿:网友
#include <linux/init.h>#include <linux/module.h>MODULE_LICENSE("Dual BSD/GPL");static int hello_init(void){ PRintk(KERN_ALERT "hello, world!/n"); return 0;}static void hello_exit(void){ printk(KERN_ALERT "Goodbye, kernel world!/n");}module_init(hello_init);module_exit(hello_exit);
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表