Re: Linux-2.1.85: replacement PATCH for ibmmca

Linus Torvalds (torvalds@transmeta.com)
Thu, 5 Feb 1998 11:25:04 -0800 (PST)


On Thu, 5 Feb 1998, Michael Elizabeth Chastain wrote:
>
> > + dep_tristate 'IBMMCA SCSI support' CONFIG_SCSI_IBMMCA $CONFIG_SCSI
> > + if [ "$CONFIG_SCSI_IBMMCA" != "n" ]; then
>
> There's a problem with this. At the beginning of execution,
> CONFIG_SCSI_IBMMCA has the value "". Menuconfig constructs its menus
> before interpreting any dep_tristate lines, so this test will result
> in the construction of a spurious menu.

This is a bug in menuconfig.

> The right way to test is:
>
> if [ "$CONFIG_SCSI_IBMMCA" = "y" -o "$CONFIG_SCSI_IBMMCA = "m" ]; then

No, the _right_ way to test it is to make sure menuconfig does the right
thing rather than expanding all the correct scripts out. The '!= "n"'
construction is quite normal, and there is no reason to not use it.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu