mirror of
https://github.com/sysprog21/lkmpg.git
synced 2025-01-20 04:42:46 +08:00
procfs1: Fix parameter descriptions (#34)
In "procfs1.c," the "buffer" is actually the second parameter of procfile_read(). The "offset" is the fourth one.
This commit is contained in:
parent
65a8f5a1d6
commit
45769753d3
|
@ -933,7 +933,7 @@ The return value is a \textbf{struct proc\_dir\_entry} , and it will be used to
|
||||||
A null return value means that the creation has failed.
|
A null return value means that the creation has failed.
|
||||||
|
|
||||||
Each time, everytime the file \textbf{/proc/helloworld} is read, the function \textbf{procfile\_read} is called.
|
Each time, everytime the file \textbf{/proc/helloworld} is read, the function \textbf{procfile\_read} is called.
|
||||||
Two parameters of this function are very important: the buffer (the first parameter) and the offset (the third one).
|
Two parameters of this function are very important: the buffer (the second parameter) and the offset (the fourth one).
|
||||||
The content of the buffer will be returned to the application which read it (for example the cat command).
|
The content of the buffer will be returned to the application which read it (for example the cat command).
|
||||||
The offset is the current position in the file.
|
The offset is the current position in the file.
|
||||||
If the return value of the function is not null, then this function is called again.
|
If the return value of the function is not null, then this function is called again.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user