From cdeaafb910311c6d3a61f4a89558fce26bc50d9d Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 24 Aug 2011 08:11:38 +0000 Subject: [PATCH] xpp: fix bashism in xpp_debug Signed-off-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10152 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/xpp_debug | 15 +++++++-------- 1 file 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'"