Yet another patch: scsi-config.2178

Michael Elizabeth Chastain (mec@shout.net)
Wed, 7 Jan 1998 01:50:42 -0600


This patch fixes a bug with drivers/scsi/Config.in and Menuconfig.

<ftp://ftp.shout.net/pub/users/mec/patch/scsi-config.2178>

The bug is this construct:

tristate 'foo driver' CONFIG_FOO
if [ "$CONFIG_FOO" != "n" ]; then
...
fi

Menuconfig has to construct its menus before executing any of the
commands. So in the menu construction pass, CONFIG_FOO will be
equal to "", and the subordinate code will always be executed.
This leads to choices on the screen that should be disabled.

This code works:

tristate 'foo driver' CONFIG_FOO
if [ "$CONFIG_FOO" = "y" -o "$CONFIG_FOO" = "m" ]; then
...
fi

People who think scripts/Menuconfig should be fixed are welcome
to work on it.

As always, I solicit test reports.

Michael Chastain
<mailto:mec@shout.net>
"love without fear"