Re: New 2.0.31 pre patch is out

Larry M. Augustin (lma@varesearch.com)
Tue, 3 Jun 1997 11:28:19 -0700


I believe this bug is in 2.0.30 also. I ran across it late last night
testing some of the audio devices that use DMA channel 0.

expr "0" : '0$\|\(-[1-9]\|[1-9]\)[0-9]*$'

fails. I'm using GNU sh-utils 1.12. How about just

expr "$ans" : '0$\|-?[1-9][0-9]*$'

Larry

>Date: Tue, 03 Jun 1997 13:31:34 +0200
>From: Thomas Sailer <sailer@ife.ee.ethz.ch>
>Organization: IfE
>X-Mailer: Mozilla 3.01 (X11; I; SunOS 5.5.1 sun4u)
>MIME-Version: 1.0
>CC: linux-kernel@vger.rutgers.edu
>References: <199706030118.VAA01124@jenolan.caipgeneral>
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Sender: owner-linux-kernel@vger.rutgers.edu
>Precedence: bulk
>
>> I would love it if only one more pre-patch is needed for a final
>> 2.0.31 so people please test this well.
>
>The configure script does not work for me.
>function int does not accept "0" as valid answer.
>I'm not sure if it is a shell utils bug however
>I'm using expr (GNU sh-utils) 1.16
>
>>From linux/scripts/Configure
>
>function int () {
> old=$(eval echo "\${$2}")
> def=${old:-$3}
> while :; do
> readln "$1 ($2) [$def] " "$def" "$old"
> if expr "$ans" : '0$\|\(-[1-9]\|[1-9]\)[0-9]*$' > /dev/null; then
>This expr ^ fails if given 0
>
> define_int "$2" "$ans"
> break
> else
> help "$2"
> fi
> done
>}
>
>
>Tom