Skip to content

Commit 1598cf3

Browse files
committed
scripts: Check multiple locations for the dynamic debug control file
Signed-off-by: Alex Forencich <alex@alexforencich.com>
1 parent 89a3b56 commit 1598cf3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/mqnic_ddcmd.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

33
module=mqnic
44

5-
#control=/sys/kernel/debug/dynamic_debug/control
65
control=/proc/dynamic_debug/control
76

7+
if ! test -f $control; then
8+
control=/sys/kernel/debug/dynamic_debug/control
9+
fi
10+
11+
if ! test -f $control; then
12+
>&2 echo "Error: dynamic debug control file not found"
13+
exit 1
14+
fi
15+
816
if [ $# -eq 0 ]; then
917
>&2 echo "Error: no argument provided"
1018
>&2 echo "usage: $0 [stmt]"

0 commit comments

Comments
 (0)