lkml.org 
[lkml]   [1996]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectbuglet: sh-utils 1.13 and/or linux kernel menuconfig
Date

I've tried the last several updates (betas? alphas?) of GNU
sh-utils from alpha.gnu.ai.mit.edu, and I've noticed a little
problem.

I use "make menuconfig" to configure my linux kernel before
compilation, and with a version of sh-utils (either one of the
versions from alpha.gnu, or the 1.13 release) there is a small,
um, breakage. (seen in Linux Kernel version 2.0.0 -> 2.0.27,
and all the 2.1.X'es)

What happens is, when you are configging a sound card, you may
need to enter a numeric value for IRQ, DMA or address port.
Menuconfig is a bash script that calls a program called lxdialog
to make a ncurses window to accept input. Menuconfig takes the
result and checks it for validity.

I noticed that everything works okay with sh-utils 1.12, but not
with 1.13 or an updated 1.12 from alpha (1.12s is the latest of
that series that I've tried).

I've traced it down to the "expr" program, If I use the one from
sh-utils 1.12, Menuconfig works as it should. With the new version,
if I enter a value, it beeps and pops up a dialog saying "you have
made an invalid entry".

Within the menuconfig script (/usr/src/linux/scripts/menuconfig)
there are two bash functions for creating dialogs to accept values
as input (one for integers, the other for hex)

Here are the clauses containing expr:

--- (for integers)
if expr $answer : '0$\|-?[1-9][0-9]*$' >/dev/null
then
eval $2="$answer"
else
eval $2="$3"
echo -en "\007"
${DIALOG} --backtitle "$backtitle" \
--infobox "You have made an invalid entry." 3 43
sleep 2
fi

--- (and for Hex)
if expr $answer : '[0-9a-fA-F]+$' >/dev/null

(the rest of the if-then-else is the same)

-----
Mark Orr
markorr@intersurf.com

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.022 / U:2.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site