Skip to content

Commit

Permalink
case-lib/lib.sh: use sudo to access debugfs files
Browse files Browse the repository at this point in the history
Apparently debugfs requires more care. Oh well.

Link: thesofproject#1171
Signed-off-by: Pierre-Louis Bossart <[email protected]>
  • Loading branch information
plbossart committed Apr 9, 2024
1 parent 74bcaa5 commit a07333d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ get_ldc_subdir()
test -e $fw_path_info ||
fw_path_info='/sys/module/snd_sof_pci/parameters/fw_path'

if fw_path=$(cat $fw_path_info); then
if fw_path=$(sudo cat $fw_path_info); then
# "cat" was succesful
if [ "$fw_path" != '(null)' ]; then
subdir=${fw_path%/} # strip any trailing slash
Expand Down Expand Up @@ -821,7 +821,7 @@ is_ipc4()
{
local ipc_type

if ipc_type=$(cat /sys/kernel/debug/sof/fw_profile/ipc_type); then
if ipc_type=$(sudo cat /sys/kernel/debug/sof/fw_profile/ipc_type); then
# "cat" was successful
case $ipc_type in
0) return 1;; # IPC3 found
Expand Down

0 comments on commit a07333d

Please sign in to comment.