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




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to