* which file functions can be used on /proc file?
@ 2005-03-07 13:22 cranium2003
0 siblings, 0 replies; 2+ messages in thread
From: cranium2003 @ 2005-03-07 13:22 UTC (permalink / raw)
To: linux-kernel
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/
^ permalink raw reply [flat|nested] 2+ messages in thread* which file functions can be used on /proc file?
@ 2005-03-05 6:52 cranium2003
0 siblings, 0 replies; 2+ messages in thread
From: cranium2003 @ 2005-03-05 6:52 UTC (permalink / raw)
To: lkg india, kernerl mail
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-07 13:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 13:22 which file functions can be used on /proc file? cranium2003
-- strict thread matches above, loose matches on Subject: below --
2005-03-05 6:52 cranium2003
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®