diff --git a/lkmpg.tex b/lkmpg.tex index 3024f200..10b3d55d 100644 --- a/lkmpg.tex +++ b/lkmpg.tex @@ -1347,14 +1347,14 @@ \section{sysfs: Interacting with your module} What is the current value of \cpp|myvariable| ? \begin{codebash} -cat /sys/kernel/mymodule/myvariable +sudo cat /sys/kernel/mymodule/myvariable \end{codebash} Set the value of \cpp|myvariable| and check that it changed. \begin{codebash} -echo "32" > /sys/kernel/mymodule/myvariable -cat /sys/kernel/mymodule/myvariable +echo "32" | sudo tee /sys/kernel/mymodule/myvariable +sudo cat /sys/kernel/mymodule/myvariable \end{codebash} Finally, remove the test module: