From: Vito Impagliazzo <vimpagliazzo@libero.it>
To: linux-kernel@vger.kernel.org
Subject: multiple printk problem
Date: Thu, 19 Feb 2004 11:11:06 +0100 [thread overview]
Message-ID: <40348BBA.9000206@libero.it> (raw)
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
next reply other threads:[~2004-02-19 10:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 10:11 Vito Impagliazzo [this message]
[not found] <20040528165600.1971fdc0.rddunlap@osdl.org>
2004-05-29 2:38 ` multiple printk problem Randy.Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40348BBA.9000206@libero.it \
--to=vimpagliazzo@libero.it \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.