public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* multiple printk problem
@ 2004-02-19 10:11 Vito Impagliazzo
  0 siblings, 0 replies; 2+ messages in thread
From: Vito Impagliazzo @ 2004-02-19 10:11 UTC (permalink / raw)
  To: linux-kernel

Hi, I'm quite new to kernel module programming,
I was wondering why multiple consecutive calls to printk will not be 
correctly logged by the system logger (linux-2.4.25 with metalog without 
buffering in my case).

Consider for example the following example, only the first message can 
be found in logs:

    #include <linux/version.h>
    #include <linux/init.h>
    #include <linux/module.h>
    #include <linux/kernel.h>


    MODULE_AUTHOR ("Vito Impagliazzo <vimpagliazzo@libero.it>");
    MODULE_DESCRIPTION ("Hello World");
    MODULE_LICENSE("Dual BSD/GPL");

    static int hello_init(void)
    {
        printf(KERN_ALERT "1\n");
        printf(KERN_ALERT "2\n");
        printf(KERN_ALERT "3\n");
        return 0;
    }

    static void hello_exit(void)
    {
        printk(KERN_ALERT "Goodbye, cruel world\n");
    }

module_init(hello_init);
module_exit(hello_exit);

Thanks,
Vito Impagliazzo

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <20040528165600.1971fdc0.rddunlap@osdl.org>]

end of thread, other threads:[~2004-05-29  2:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-19 10:11 multiple printk problem Vito Impagliazzo
     [not found] <20040528165600.1971fdc0.rddunlap@osdl.org>
2004-05-29  2:38 ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox