<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 24, 2014 at 11:09 PM, lx <span dir="ltr"><<a href="mailto:lxlenovostar@gmail.com" target="_blank">lxlenovostar@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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></div></blockquote><div>use printk or do echo "file_name +p" > /sys/kernel/debug/dyanmic_debug/control </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><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>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br></div></div>