Reading and Writing Information

As noted in Section 10.1.5, the kernel uses the operations stored in proc_file_operations to read and write the contents of regular proc entries. The contents of the function pointers in this structure are as follows:

fs/proc/generic.c static struct file_operations proc_file_operations = { .llseek = proc_file_lseek,

.read = proc_file_read,

.write = proc_file_write,

The sections below examine the read and write operations implemented by means of proc_file_read and proc_file_write.

Continue reading here: Implementation ofprocfileread

Was this article helpful?

0 0