안녕하세요
kernel 2.6에서 간단한 모듈을 작성하고 있습니다.
아래는 간단한 모듈 입니다.
[code:1]
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
static int hello_init(void)
{
printk(KERN_ALERT " Hello, word\n");
return 0;
}
static void hello_exit(void)
{
printk(KERN_INFO " Goodbye word\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE("Dual BSD/GPL");