<div dir="ltr">hi all:<br> I'm confused with pr_debug. My codes is:<div>###########################################</div><div><div>#include <linux/module.h></div><div>#include <linux/kernel.h></div><div>
<br></div><div>static int __init init_page_dir(void)</div><div>{</div><div> pr_debug("Hello world\n");</div><div> return 0;</div><div>}</div><div><br></div><div>static void __exit exit_page_dir(void)</div>
<div>{</div><div> pr_debug("\nGoodbye now...\n\n");</div><div>}</div><div><br></div><div>MODULE_LICENSE("GPL");</div><div>module_init(init_page_dir);</div><div>module_exit(exit_page_dir);</div></div>
<div>###########################################</div><div>I make it, and insmod it. But the messages of "Hello world" don't show.</div><div><br></div><div>So, My question is If i want to fix it , I should set the <i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:22px;text-align:-webkit-auto">DEFAULT_MESSAGE_LOGLEVEL and </i></div>
<div><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:22px;text-align:-webkit-auto">rebuild the kernel ?</i></div><div><br></div><div>My kernel version is:2.6.18</div><div>OS is: centOS</div>
<div><br></div><div>Thank you.</div></div>