2005-03-05 06:54:41

by cranium2003

[permalink] [raw]
Subject: which file functions can be used on /proc file?


hello,
i found that in struct proc_dir_entry struct
file_operations * proc_fops; is
defined. and struct file_operations has defined read,
write, poll,llseek,ioctl,flush,release,lock etc
functions. so can all these functions be used on any
/proc entry in usermode as well as in kenrel mode?
Also can following functions be used on my own
created /proc file kernel
module and when to use them as i have alredy struct
file_opereations read and
write routine that read/write to/from /proc file.
typedef int (read_proc_t)(char *page, char **start,
off_t off,
int count, int *eof, void
*data);
typedef int (write_proc_t)(struct file *file, const
char *buffer,
unsigned long count, void
*data);
typedef int (get_info_t)(char *, char **, off_t, int);

regards,
cranium.




__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/