On Sat, Nov 16, 2002 at 03:00:16AM -0500, Raghu R. Arur wrote: > cant we fill in the file_operations struct with sys_read and > sys_write and assign that to proc_dir* file_ops entry in the proc > stucture. No. sys_read and sys_write are user entry points to the kernel. If you read the source for sys_read and sys_write, you'll eventually find that the kernel calls whatever functions you register in the file_operations struct. So you'll need to write your own read and write implementations that the kernel can use them when users call sys_read and sys_write. There are many good examples; check Linux Device Drivers, 2nd Edition, for some concrete and dirt-easy implementations. -- "A mouse can be just as dangerous as a bullet or a bomb." -- US Representative Lamar Smith (R-Texas)
Attachment:
pgp00212.pgp
Description: PGP signature