浏览代码

procfs1: Fix parameter descriptions (#34)

In "procfs1.c," the "buffer" is actually the second parameter of procfile_read().
The "offset" is the fourth one.
demonsome 3 年之前
父节点
当前提交
45769753d3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lkmpg.tex

+ 1 - 1
lkmpg.tex

@@ -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.