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