question about pr_info (newbie)
Hi, I have the following very simply kernel module. The module_init() method has one call to pr_info("Hello world!\n"). However, when I run "insmod helloWorld.ko" I get TWO messages in the kernel log and not one, as I expected: .. Dec 29 11:24:40 kv kernel: [67479.245642] Hello world! Dec 29 11:24:40 kv kernel: Hello world! ... The same is for "rmmod helloWorld" (TWO messages instead of one) I built and run this module under kernel 3.17.6-300.fc21.x86_64, Fedora 21. Any ideas ? Is there some way to configure the kernel to emit only one message in such a case ? Following is the code: static int __init hello_init(void) { pr_info("Hello world!\n"); return 0; ded. } static void __exit hello_cleanup(void) { pr_info("Cleaning up module.\n"); } module_init(hello_init); module_exit(hello_cleanup); Regards, Kevin
On Mon, 29 Dec 2014 11:32:22 +0200, Kevin Wilson said:
The module_init() method has one call to pr_info("Hello world!\n"). However, when I run "insmod helloWorld.ko" I get TWO messages in the kernel log and not one, as I expected:
.. Dec 29 11:24:40 kv kernel: [67479.245642] Hello world! Dec 29 11:24:40 kv kernel: Hello world!
Check to make sure you don't have a bug in your syslog.conf causing it to log the message twice....
participants (2)
-
Kevin Wilson -
Valdis.Kletnieks@vt.edu