⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello.c

📁 《ARM嵌入式Linux设备驱动实例开发》
💻 C
字号:
/*
 * File Name: hello.c
 *
 * Descriptions: 
 *		The simple example of kernel module code.
 *
 * Author: 
 *		Mike Lee
 * Kernel Version: 2.6.20
 *
 * Update:
 * 		-	2007.07.13	Mike Lee	 Creat this file
 */

#include <linux/init.h>
#include <linux/module.h>

MODULE_LICENSE("Dual BSD/GPL");
char *who="world";

static int hello_init(void)
{
        printk(KERN_ALERT "Hello, %s!\n", who);
        return 0;
}

static void hello_exit(void)
{
        printk(KERN_ALERT "Goodbye, %s!\n",who);
}

module_init(hello_init);
module_exit(hello_exit);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -