Messages in this thread |  | | | Date | Thu, 19 Feb 2004 11:11:06 +0100 | | From | Vito Impagliazzo <> | | Subject | multiple printk problem |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |