Skip to content

Commit

Permalink
Merge pull request #237 from heartofrain/master
Browse files Browse the repository at this point in the history
Revise the depiction of return type of proc_create().
  • Loading branch information
jserv authored Oct 7, 2023
2 parents 7ae8eac + a855812 commit eaecd29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ \section{The /proc File System}
There are three parts: create the file \verb|/proc/helloworld| in the function \cpp|init_module|, return a value (and a buffer) when the file \verb|/proc/helloworld| is read in the callback function \cpp|procfile_read|, and delete the file \verb|/proc/helloworld| in the function \cpp|cleanup_module|.

The \verb|/proc/helloworld| is created when the module is loaded with the function \cpp|proc_create|.
The return value is a \cpp|struct proc_dir_entry|, and it will be used to configure the file \verb|/proc/helloworld| (for example, the owner of this file).
The return value is a pointer to \cpp|struct proc_dir_entry|, and it will be used to configure the file \verb|/proc/helloworld| (for example, the owner of this file).
A null return value means that the creation has failed.

Every time the file \verb|/proc/helloworld| is read, the function \cpp|procfile_read| is called.
Expand Down

0 comments on commit eaecd29

Please sign in to comment.