Skip to content

Commit

Permalink
Merge pull request #263 from pao0626/command-permission-changes
Browse files Browse the repository at this point in the history
Add sudo for file access permissions
  • Loading branch information
jserv authored Jul 3, 2024
2 parents 031b9d2 + be16ad6 commit 7bcc4fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1346,14 +1346,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:
Expand Down

0 comments on commit 7bcc4fb

Please sign in to comment.