This doens't work, but at least we tried. This means
if we ever do want to disable something which an old
kernel enabled we'll need to relabelt the kconfig option.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
function define_config {
VAR=$1
VALUE=$2
- echo "#ifndef $VAR"
case $VALUE in
- n) # Do nothing
+ n) # Try to undefine it
+ echo "#undef $VAR"
;;
y)
+ echo "#ifndef $VAR"
echo "#define $VAR 1"
+ echo "#endif /* $VAR */ "
;;
m)
+ echo "#ifndef $VAR"
echo "#define $VAR 1"
+ echo "#endif /* $VAR */ "
;;
*) # Assume string
# XXX: add better checks to make sure what was on
# the right was indeed a string
+ echo "#ifndef $VAR"
echo "#define $VAR \"$VALUE\""
+ echo "#endif /* $VAR */ "
;;
esac
- echo "#endif /* $VAR */ "
}
# This deals with core compat-wireless kernel requirements.