summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xpp_debug
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-08-24 08:11:38 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-08-24 08:11:38 +0000
commit55221acb362755259ebf5ea181d63828ba5ee6fb (patch)
treeaebbcdc4ee368006826595e501bee9e4fa2da565 /drivers/dahdi/xpp/xpp_debug
parent34e330d2c4b0d438700434cbacf29aeabafad1db (diff)
xpp: fix bashism in xpp_debug
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10152 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_debug')
-rwxr-xr-xdrivers/dahdi/xpp/xpp_debug15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/dahdi/xpp/xpp_debug b/drivers/dahdi/xpp/xpp_debug
index a89e0c4..1848000 100755
--- a/drivers/dahdi/xpp/xpp_debug
+++ b/drivers/dahdi/xpp/xpp_debug
@@ -43,11 +43,10 @@ show_debug() {
list=''
for n in $dbg_names
do
- if (( val & (1 << j) ))
- then
+ if [ $(( val & (1 << j) )) -ne 0 ]; then
list="$list $n"
fi
- let j++
+ j=$((j+1))
done
if [ "$list" = "" ]; then
list=' NONE'
@@ -67,19 +66,19 @@ calc_debug() {
for n in $dbg_names
do
if [ "$wanted" = "$n" ]; then
- (( val |= (1 << j) ))
+ : $(( val |= (1 << j) ))
found=1
elif [ "$wanted" = -"$n" ]; then
- (( val &= ~(1 << j) ))
+ : $(( val &= ~(1 << j) ))
found=1
elif [ "$wanted" = "ANY" ]; then
- (( val = ~0 ))
+ : $(( val = ~0 ))
found=1
elif [ "$wanted" = -"ANY" -o "$wanted" = "NONE" ]; then
- (( val = 0 ))
+ val=0
found=1
fi
- let j++
+ j=$((j+1))
done
if [ "$found" -eq 0 ]; then
echo >&2 "$0: Unknown debug flag '$wanted'"