bools in modules fix to require the boolean in optionals that are part of the base module, and move bool declarations in the base module/monolithic

This commit is contained in:
Chris PeBenito 2007-03-30 12:43:15 +00:00
parent dde00d4e70
commit f6ddd6b9b7
3 changed files with 13 additions and 33 deletions

View File

@ -128,10 +128,10 @@ define(`dflt_or_overr',`ifdef(`$1',$1,$2)')
# This needs to be reworked so expressions # This needs to be reworked so expressions
# with parentheses can work. # with parentheses can work.
define(`delcare_required_symbols',` define(`declare_required_symbols',`
ifelse(regexp($1, `\w'), -1, `', `dnl ifelse(regexp($1, `\w'), -1, `', `dnl
bool regexp($1, `\(\w+\)', `\1'); bool regexp($1, `\(\w+\)', `\1');
delcare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl declare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl
') dnl ') dnl
') ')
@ -140,16 +140,7 @@ delcare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl
# Tunable declaration # Tunable declaration
# #
define(`gen_tunable',` define(`gen_tunable',`
ifdef(`self_contained_policy',`
bool $1 dflt_or_overr(`$1'_conf,$2); bool $1 dflt_or_overr(`$1'_conf,$2);
',`
# loadable module tunable
# declaration will go here
# instead of bool when
# loadable modules support
# tunables
bool $1 dflt_or_overr(`$1'_conf,$2);
')
') ')
############################## ##############################
@ -157,24 +148,12 @@ define(`gen_tunable',`
# Tunable policy handling # Tunable policy handling
# #
define(`tunable_policy',` define(`tunable_policy',`
ifdef(`self_contained_policy',`
if (`$1') {
$2
ifelse(`$3',`',`',`} else {
$3
')}
',`
# structure for tunables
# will go here instead of a
# conditional when loadable
# modules support tunables
gen_require(` gen_require(`
delcare_required_symbols(`$1') declare_required_symbols(`$1')
') ')
if (`$1') { if (`$1') {
$2 $2
ifelse(`$3',`',`',`} else { ifelse(`$3',`',`',`} else {
$3 $3
')} ')}
')
') ')

View File

@ -5,9 +5,10 @@
/require \{/,/} # end require/b nextline /require \{/,/} # end require/b nextline
/optional \{/,/} # end optional/b nextline /optional \{/,/} # end optional/b nextline
/^[[:blank:]]*(attribute|type(alias)?) / s/^/# this line was moved by the build process: &/ /^[[:blank:]]*(attribute|type(alias)?) /s/^/# this line was moved by the build process: &/
/^[[:blank:]]*(port|node|netif|genfs)con /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*(port|node|netif|genfs)con /s/^/# this line was moved by the build process: &/
/^[[:blank:]]*fs_use_(xattr|task|trans) /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*fs_use_(xattr|task|trans) /s/^/# this line was moved by the build process: &/
/^[[:blank:]]*sid /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*sid /s/^/# this line was moved by the build process: &/
/^[[:blank:]]*bool /s/^/# this line was moved by the build process: &/
:nextline :nextline

View File

@ -5,7 +5,7 @@
/require \{/,/} # end require/b nextline /require \{/,/} # end require/b nextline
/optional \{/,/} # end optional/b nextline /optional \{/,/} # end optional/b nextline
/^[[:blank:]]*(attribute|type(alias)?) /{ /^[[:blank:]]*(attribute|type(alias)?|bool) /{
s/^[[:blank:]]+// s/^[[:blank:]]+//
p p
} }