How do I get to print the messages on "Stdout" Regards
Manoj -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 9:47 PM To: [EMAIL PROTECTED] Subject: Re: printk not working!!!! printk() in a kernel module writes messages to the kernel log buffer, which syslogd then puts into the /var/log/messages file. you will not see the printk messages on stdout where you run the insmod command, since the module is in the kernel, not your user space process. you can also see the printk messages via "dmesg". -Skottie Manoj wrote: > > Hi all, > > I have redhat-7.2 on X86. > > I have written a simple sample driver. > > ******* > Code is as below: > > #define MODULE > #include<linux/kernel.h> > #include<linux/module.h> > > int init_module(void) > { > printk("Module inserted\n"); > return 0; > } > > void cleanup_module() > { > printk("module removed\n"); > } > > ********* > > I compiled it with > gcc -c -Wall -DMODULE -D__KERNEL__ driver.c > > Inserted module with: > insmod driver.c > > But printk statements are not giving any output > > even after "rmmod driver" I get no output. > > But if I do "cat /var/log/messages" > output can be seen in "messages" file. > > Can anybody help me with this. > > Thanks for any help in advance. > > Manoj > > _______________________________________________ > Guinness-list mailing list > [EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/guinness-list -- Scott Miller | Animation Technology work: [EMAIL PROTECTED] | Dreamworks Feature Animation life: [EMAIL PROTECTED] _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list