about pr_debug
Pranay Srivastava
pranjas at gmail.com
Wed Jun 25 03:38:17 EDT 2014
On Wed, Jun 25, 2014 at 11:39 AM, lx <lxlenovostar at gmail.com> wrote:
> hi all:
> I'm confused with pr_debug. My codes is:
> ###########################################
> #include <linux/module.h>
> #include <linux/kernel.h>
>
> static int __init init_page_dir(void)
> {
> pr_debug("Hello world\n");
> return 0;
> }
Add ccflags-y += -DDEBUG in your Kbuild or Makefile that should work.
>
> static void __exit exit_page_dir(void)
> {
> pr_debug("\nGoodbye now...\n\n");
> }
>
> MODULE_LICENSE("GPL");
> module_init(init_page_dir);
> module_exit(exit_page_dir);
> ###########################################
> I make it, and insmod it. But the messages of "Hello world" don't show.
>
> So, My question is If i want to fix it , I should set the
> DEFAULT_MESSAGE_LOGLEVEL and
> rebuild the kernel ?
>
> My kernel version is:2.6.18
> OS is: centOS
>
> Thank you.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
---P.K.S
More information about the Kernelnewbies
mailing list