Merge pull request #19 from fennecJ/master

Fix typo
This commit is contained in:
Jim Huang 2021-07-30 00:40:58 +08:00 committed by GitHub
commit b50323330c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,7 +364,7 @@ This and a few other macros describing the module are illustrated in the below e
Modules can take command line arguments, but not with the argc/argv you might be used to.
To allow arguments to be passed to your module, declare the variables that will take the values of the command line arguments as global and then use the module\_param() macro, (defined in linux/moduleparam.h) to set the mechanism up.
At runtime, insmod will fill the variables with any command line arguments that are given, like ./insmod mymodule.ko myvariable=5.
At runtime, insmod will fill the variables with any command line arguments that are given, like insmod ./mymodule.ko myvariable=5.
The variable declarations and macros should be placed at the beginning of the module for clarity.
The example code should clear up my admittedly lousy explanation.