Skip to contentSkip to conversation

patch for alsa-info.sh to quote [ -d $SYSFS ]

PATCH Luis Yanes 2 participants 2 messages Oct 25, 2008 – Oct 27, 2008

lore
Share & tools
lore

Luis Yanes

author
#0 lore raw

Found a couple of bugs in http://www.alsa-project.org/alsa-info.sh
while running it in my system.

* old uname <= 2.0.11 doesn't accept -o argument
* $SYSFS is not quoted while checking if directory exist and fails if empty

Attached is a small patch for the first of them, but think that all variables also should be quoted to avoid future problems.

Regards.

alsa-info.sh renamed from alsa-info.sh.orig +1 -1
@@ -373,7 +373,7 @@
 echo "" >> $FILE
 fi
 
-if [ -d $SYSFS ]
+if [ -d "$SYSFS" ]
 then
 echo "!!Loaded sound module options" >> $FILE
 echo "!!--------------------------" >> $FILE

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Sat, 25 Oct 2008 14:38:03 +0200,

Quoted 10 lines · Luis Yanes

Found a couple of bugs in http://www.alsa-project.org/alsa-info.sh
while running it in my system.

* old uname <= 2.0.11 doesn't accept -o argument
* $SYSFS is not quoted while checking if directory exist and fails if empty

Attached is a small patch for the first of them, but think that all variables also should be quoted to avoid future problems.

Thanks, now it's in the upstream.

Takashi