* about pr_debug
@ 2014-06-25 6:09 lx
2014-06-25 6:34 ` Real Name
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: lx @ 2014-06-25 6:09 UTC (permalink / raw)
To: kernelnewbies
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;
}
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140625/9f0112f3/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread* about pr_debug
2014-06-25 6:09 about pr_debug lx
@ 2014-06-25 6:34 ` Real Name
2014-06-25 6:48 ` Varka Bhadram
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Real Name @ 2014-06-25 6:34 UTC (permalink / raw)
To: kernelnewbies
On Wed, Jun 25, 2014 at 02:09:40PM +0800, lx 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;
> }
>
> 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 ?*
>
https://www.kernel.org/doc/local/pr_debug.txt
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread* about pr_debug
2014-06-25 6:09 about pr_debug lx
2014-06-25 6:34 ` Real Name
@ 2014-06-25 6:48 ` Varka Bhadram
2014-06-25 8:20 ` Bjørn Mork
2014-06-25 6:55 ` anish singh
2014-06-25 7:38 ` Pranay Srivastava
3 siblings, 1 reply; 9+ messages in thread
From: Varka Bhadram @ 2014-06-25 6:48 UTC (permalink / raw)
To: kernelnewbies
refer this :https://www.kernel.org/doc/local/pr_debug.txt
On 06/25/2014 11:39 AM, lx 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;
> }
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140625/af7d4414/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread* about pr_debug
2014-06-25 6:09 about pr_debug lx
2014-06-25 6:34 ` Real Name
2014-06-25 6:48 ` Varka Bhadram
@ 2014-06-25 6:55 ` anish singh
2014-06-25 7:38 ` Pranay Srivastava
3 siblings, 0 replies; 9+ messages in thread
From: anish singh @ 2014-06-25 6:55 UTC (permalink / raw)
To: kernelnewbies
On Tue, Jun 24, 2014 at 11:09 PM, lx <lxlenovostar@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");
>
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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140624/938f1f0c/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread* about pr_debug
2014-06-25 6:09 about pr_debug lx
` (2 preceding siblings ...)
2014-06-25 6:55 ` anish singh
@ 2014-06-25 7:38 ` Pranay Srivastava
3 siblings, 0 replies; 9+ messages in thread
From: Pranay Srivastava @ 2014-06-25 7:38 UTC (permalink / raw)
To: kernelnewbies
On Wed, Jun 25, 2014 at 11:39 AM, lx <lxlenovostar@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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-06-25 9:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 6:09 about pr_debug lx
2014-06-25 6:34 ` Real Name
2014-06-25 6:48 ` Varka Bhadram
2014-06-25 8:20 ` Bjørn Mork
2014-06-25 9:47 ` lx
2014-06-25 9:50 ` Varka Bhadram
2014-06-25 9:57 ` lx
2014-06-25 6:55 ` anish singh
2014-06-25 7:38 ` Pranay Srivastava
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.