LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux kernel character driver (https://www.linuxquestions.org/questions/linux-newbie-8/linux-kernel-character-driver-731498/)

xinren 06-08-2009 04:11 PM

linux kernel character driver
 
hi there,

I am a newbie in Linux kernel and I have a Debian 2.6.4 installed. I have compiled hello.c module, and I can install and uninstall the driver. I then create a simple character driver. I can compile it, load the module and remove the module and I can see the debug message using printk. I can write to the module using echo and then read it using cat. The problem is that open, release, read, and write functions are not called. I cannot see any debug message from these functions. Any pointer? Thanks in advance.

Xinren

sukhdham 06-16-2010 12:48 AM

i too have the same problem if you have any soultions pls to let me know

zaffer 06-26-2012 02:53 AM

hi check this
 
i believe u have mapped them properly in struct file operations
also do the following
# mknod node c major no minor no(wen u dmesg u get these major and minor no)
..........make an application like app.c and call read and write in it
then compile the application gc app.c
# ./a.out node ...........
it will work


All times are GMT -5. The time now is 09:05 AM.