Re: about pr_debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On Tue, Jun 24, 2014 at 11:09 PM, lx <lxlenovostar@xxxxxxxxx> 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");
use printk or do echo "file_name +p" > /sys/kernel/debug/dyanmic_debug/control 
    return 0;
}

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@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux