Re: Linux-1.3.62

Dick Streefland (rnews@tasking.nl)
Thu, 15 Feb 1996 18:14:57 +0100 (MET)


On Wed, Wed, 14 Feb 1996, Dan Merillat wrote:
| On Mon, 12 Feb 1996, Linus Torvalds wrote:
| > Also note that as of 1.3.61 there has been a config option for a.out
| > executable format support (called "ECOFF" on the alpha), and if you are
| > using an old config file that won't have been picked up automatically.
| > 99% of all people want to have this enabled (_very_ few people have a
| > truly 100% ELF setup).
|
| Speaking of which: Can you set make oldconfig to _ASK_ for anything that
| it dosn't know about rather then choose N as the default? That way
| on a new kernel release, you can just do a make oldconfig and change
| any new options, rather then try to find what has been added.

Good idea! Actually, it isn't very hard to implement. Attached is a
quick patch to scripts/Config which does just this. New configuration
items will be flagged with (NEW), and you will have to answer these new
questions even when doing a "make oldconfig".

-- 
Dick Streefland              ////         Tasking Software BV
dicks@tasking.nl            (@ @)             The Netherlands
------------------------oOO--(_)--OOo------------------------

--- linux/scripts/Configure.orig Thu Feb 15 16:40:47 1996 +++ linux/scripts/Configure Thu Feb 15 17:50:21 1996 @@ -27,6 +27,9 @@ # # 010296 Aaron Ucko (ucko@vax1.rockhurst.edu) - fix int and hex to accept # arbitrary ranges +# +# 150296 Dick Streefland (dicks@tasking.nl) - report new configuration +# items and ask for a value even when doing a "make oldconfig" # # Make sure we're really running bash. @@ -88,14 +91,15 @@ # # readln reads a line into $ans. # -# readln prompt default +# readln prompt default oldval # function readln () { - if [ "$DEFAULT" = "-d" ]; then + if [ "$DEFAULT" = "-d" -a -n "$3" ]; then echo "$1" ans=$2 else echo -n "$1" + [ -z "$3" ] && echo -n "(NEW) " IFS='@' read ans </dev/tty || exit 1 [ -z "$ans" ] && ans=$2 fi @@ -143,7 +147,8 @@ # bool question define # function bool () { - def=$(eval echo "\${$2:-'n'}") + old=$(eval echo "\${$2}") + def=${old:-'n'} case "$def" in "y" | "m") defprompt="Y/n/?" def="y" @@ -152,7 +157,7 @@ ;; esac while :; do - readln "$1 ($2) [$defprompt] " "$def" + readln "$1 ($2) [$defprompt] " "$def" "$old" case "$ans" in [yY] | [yY]es ) define_bool "$2" "y" break;; @@ -173,7 +178,8 @@ if [ "$CONFIG_MODULES" != "y" ]; then bool "$1" "$2" else - def=$(eval echo "\${$2:-'n'}") + old=$(eval echo "\${$2}") + def=${old:-'n'} case "$def" in "y") defprompt="Y/m/n/?" ;; @@ -183,7 +189,7 @@ ;; esac while :; do - readln "$1 ($2) [$defprompt] " "$def" + readln "$1 ($2) [$defprompt] " "$def" "$old" case "$ans" in [yY] | [yY]es ) define_bool "$2" "y" break ;; @@ -199,17 +205,18 @@ } # -# dep_tristate processes a tristate argument +# dep_tristate processes a tristate argument that depends upon +# another option. If the option we depend upon is a module, +# then the only allowable options are M or N. If Y, then +# this is a normal tristate. This is used in cases where modules +# are nested, and one module requires the presence of something +# else in the kernel. # -# tristate question define default that depends upon -# another option. If the option we depend upon is a module, -# then the only allowable options are M or N. If Y, then -# this is a normal tristate. This is used in cases where modules -# are nested, and one module requires the presence of something -# else in the kernel. +# tristate question define default # function dep_tristate () { - def=$(eval echo "\${$2:-'n'}") + old=$(eval echo "\${$2}") + def=${old:-'n'} if [ "$3" = "n" ]; then define_bool "$2" "n" elif [ "$3" = "y" ]; then @@ -224,7 +231,7 @@ ;; esac while :; do - readln "$1 ($2) [$defprompt] " "$def" + readln "$1 ($2) [$defprompt] " "$def" "$old" case "$ans" in [nN] | [nN]o ) define_bool "$2" "n" break ;; @@ -263,9 +270,10 @@ # int question define default # function int () { - def=$(eval echo "\${$2:-$3}") + old=$(eval echo "\${$2}") + def=${old:-$3} while :; do - readln "$1 ($2) [$def] " "$def" + readln "$1 ($2) [$def] " "$def" "$old" if expr "$ans" : '0$\|-?[1-9][0-9]*$' > /dev/null; then define_int "$2" "$ans" break @@ -291,10 +299,11 @@ # hex question define default # function hex () { - def=$(eval echo "\${$2:-$3}") + old=$(eval echo "\${$2}") + def=${old:-$3} def=${def#*[x,X]} while :; do - readln "$1 ($2) [$def] " "$def" + readln "$1 ($2) [$def] " "$def" "$old" ans=${ans#*[x,X]} if expr "$ans" : '[0-9a-fA-F]+$' > /dev/null; then define_hex "$2" "$ans" @@ -322,7 +331,8 @@ function choice () { question="$1" choices="$2" - def="$3" + old= + def=$3 # determine default answer: names="" @@ -335,6 +345,7 @@ names="$1" fi if [ "$(eval echo \"\${$2}\")" = "y" ]; then + old=$1 def=$1 fi shift; shift @@ -343,7 +354,7 @@ val="" while [ -z "$val" ]; do ambg=n - readln "$question ($names) [$def] " "$def" + readln "$question ($names) [$def] " "$def" "$old" ans=$(echo $ans | tr a-z A-Z) set -- $choices while [ -n "$1" ]; do