kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* question about pr_info (newbie)
@ 2014-12-29  9:32 Kevin Wilson
  2014-12-29 13:58 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wilson @ 2014-12-29  9:32 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-30 14:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1.1419872404.20373.kernelnewbies@kernelnewbies.org>
2014-12-29 17:11 ` question about pr_info (newbie) Larry Martin
2014-12-30 11:39   ` Kevin Wilson
2014-12-30 14:04     ` Larry Martin
2014-12-29  9:32 Kevin Wilson
2014-12-29 13:58 ` Valdis.Kletnieks at vt.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).