Some modules are without any parameters, and there are no "parameters"
subdirectories for such modules. Since alsa-info.sh tries to access
modules/* files, this results in (non-fatal) errors.
Add the check of the parameters subdirectory before accessing the
actual parameter files for avoiding such errors.
Link: https://bugzilla.suse.com/show_bug.cgi?id=1279431
Signed-off-by: Takashi Iwai <tiwai@suse.de>
echo "" >> $FILE
for mod in $(cat /proc/asound/modules | awk '{ print $2 }'); do
echo "!!Module: $mod" >> $FILE
- for params in $(echo $SYSFS/module/$mod/parameters/*); do
- echo -ne "\t"
- value=$(cat $params)
- echo "$params : $value" | sed 's:.*/::'
- done >> $FILE
+ if [ -d "$SYSFS/module/$mod/parameters" ]; then
+ for params in $(echo $SYSFS/module/$mod/parameters/*); do
+ echo -ne "\t"
+ value=$(cat $params)
+ echo "$params : $value" | sed 's:.*/::'
+ done >> $FILE
+ fi
echo "" >> $FILE
done
echo "" >> $FILE