1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

scripts: Add mqnic_ddcmd.sh script to control dynamic debug statements

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich 2023-07-07 01:11:37 -07:00
parent fa75b47b7b
commit 56c89640e0

21
scripts/mqnic_ddcmd.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
module=mqnic
#control=/sys/kernel/debug/dynamic_debug/control
control=/proc/dynamic_debug/control
if [ $# -eq 0 ]; then
>&2 echo "Error: no argument provided"
>&2 echo "usage: $0 [stmt]"
>&2 echo "Disable all debug print statements: $0 =_"
>&2 echo "Enable all debug print statements: $0 =p"
>&2 echo "More verbose: $0 =pflmt"
>&2 echo "Pattern match: $0 format \"some-string\" =p"
>&2 echo "Current configuration:"
grep "\[$module\]" $control >&2
exit 1
fi
echo module $module "${@@Q}" > $control