안녕하세요? 커널 모듈 테스트 중 이상이 있어 고수님들의 조언을 받고자 이렇게 글을 남깁니다.
다음과 같이 하면 로그를 이상 없이 남깁니다.
1. hello.c
#include
#include
#include
int __init init_hello(void)
{
printk(KERN_ALERT "[Module Message] Hello, Module.\n");
return 0;
}
void __exit exit_hello(void)
{
printk(KERN_ALERT "[Module Message] Do you really want to break up with me?\n");
}
module_init(init_hello);
module_exit(exit_hello);
MODULE_LICENSE("GPL");