Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

case-lib/lib.sh: use sudo to access debugfs files #1172

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading