Skip to content

Commit 7bcc4fb

Browse files
authored
Merge pull request #263 from pao0626/command-permission-changes
Add sudo for file access permissions
2 parents 031b9d2 + be16ad6 commit 7bcc4fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lkmpg.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -1346,14 +1346,14 @@ \section{sysfs: Interacting with your module}
13461346
What is the current value of \cpp|myvariable| ?
13471347

13481348
\begin{codebash}
1349-
cat /sys/kernel/mymodule/myvariable
1349+
sudo cat /sys/kernel/mymodule/myvariable
13501350
\end{codebash}
13511351

13521352
Set the value of \cpp|myvariable| and check that it changed.
13531353

13541354
\begin{codebash}
1355-
echo "32" > /sys/kernel/mymodule/myvariable
1356-
cat /sys/kernel/mymodule/myvariable
1355+
echo "32" | sudo tee /sys/kernel/mymodule/myvariable
1356+
sudo cat /sys/kernel/mymodule/myvariable
13571357
\end{codebash}
13581358

13591359
Finally, remove the test module:

0 commit comments

Comments
 (0)