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: #1171
Signed-off-by: Pierre-Louis Bossart <[email protected]>
  • Loading branch information
plbossart authored and marc-hb committed Apr 10, 2024
1 parent bef7519 commit 46219fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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 Expand Up @@ -893,7 +893,7 @@ print_module_params()
echo "----------------------------------------"

echo "--------- Printing debugfs settings ----------"
grep -H ^ /sys/kernel/debug/sof/fw_profile/* || true
sudo grep -H ^ /sys/kernel/debug/sof/fw_profile/* || true
echo "----------------------------------------------"
}

Expand Down

0 comments on commit 46219fa

Please sign in to comment.