blob: 37c62268cc151b84de0ce44ba0437133b42b770b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Check if osnoise options are enabled or disabled.
# Usage: check-osnoise-option.sh <OPTION1> [<OPTION2> ...]
# Output: one line per option in the format "OPTION=enabled" or "OPTION=disabled"
options=$(tr ' ' '\n' < /sys/kernel/tracing/osnoise/options)
for name in "$@"; do
if echo "$options" | grep -q "^NO_${name}$"; then
echo "$name=disabled"
elif echo "$options" | grep -q "^${name}$"; then
echo "$name=enabled"
else
echo "$name=unsupported"
fi
done
|