From: Takashi Iwai Date: Wed, 16 Sep 2026 13:05:58 +0000 (+0200) Subject: alsa-info: Skip reading empty SoundWire device info X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f3537ede21d0bc5b34835988752523b08459c532;p=alsa-utils.git alsa-info: Skip reading empty SoundWire device info The SoundWire device status information is gathered from ACPI adr sysfs files, but since we take only the entries for the known vendors, this list can be empty, resulting in no $TEMPDIR/sdwstatus.tmp file created. This will end up with the unexpected (non-fatal) errors for alsa-info.sh. For addressing it, add the check of the existence of tmp file before reading it. Link: https://bugzilla.suse.com/show_bug.cgi?id=1279431 Signed-off-by: Takashi Iwai --- diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index eac3694..1ec11a3 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -549,7 +549,9 @@ echo "" >> $FILE echo "!!ACPI SoundWire Device Status Information" >> $FILE echo "!!---------------" >> $FILE echo "" >> $FILE -cat $TEMPDIR/sdwstatus.tmp >> $FILE +if [ -f $TEMPDIR/sdwstatus.tmp ]; then + cat $TEMPDIR/sdwstatus.tmp >> $FILE +fi echo "" >> $FILE echo "" >> $FILE echo "!!Kernel Information" >> $FILE