How to read from /proc entry in another kernel module?
Hello all,
I have written one /proc file entry kernel module program which creats ff file under /proc. When i open and write to that file using fwrite from normal user file program it works. Now i want to read the contents of /proc/ff file in another kenrel module. How can i do that?
I use following functions to create/read/write/close /proc/ff file and assigned those to ff_file_operations structure.
static int ff_open(struct inode *inodep, struct file *filp);
static int ff_release(struct inode *inodep, struct file *filp);
static ssize_t ff_read(struct file *filp, char *buf, size_t count, loff_t *ppos);
static ssize_t ff_write(struct file *filp, const char *buf, size_t count, loff_t *ppos);
static struct file_operations ff_file_operations = {
open: ff_open,
release: ff_release,
read: ff_read,
write: ff_write,
};
|