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:
parent
dde00d4e70
commit
f6ddd6b9b7
@ -128,10 +128,10 @@ define(`dflt_or_overr',`ifdef(`$1',$1,$2)')
|
||||
# This needs to be reworked so expressions
|
||||
# with parentheses can work.
|
||||
|
||||
define(`delcare_required_symbols',`
|
||||
define(`declare_required_symbols',`
|
||||
ifelse(regexp($1, `\w'), -1, `', `dnl
|
||||
bool regexp($1, `\(\w+\)', `\1');
|
||||
delcare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl
|
||||
declare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl
|
||||
') dnl
|
||||
')
|
||||
|
||||
@ -140,16 +140,7 @@ delcare_required_symbols(regexp($1, `\w+\(.*\)', `\1'))dnl
|
||||
# Tunable declaration
|
||||
#
|
||||
define(`gen_tunable',`
|
||||
ifdef(`self_contained_policy',`
|
||||
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);
|
||||
')
|
||||
bool $1 dflt_or_overr(`$1'_conf,$2);
|
||||
')
|
||||
|
||||
##############################
|
||||
@ -157,24 +148,12 @@ define(`gen_tunable',`
|
||||
# Tunable policy handling
|
||||
#
|
||||
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(`
|
||||
delcare_required_symbols(`$1')
|
||||
')
|
||||
if (`$1') {
|
||||
$2
|
||||
ifelse(`$3',`',`',`} else {
|
||||
$3
|
||||
')}
|
||||
gen_require(`
|
||||
declare_required_symbols(`$1')
|
||||
')
|
||||
if (`$1') {
|
||||
$2
|
||||
ifelse(`$3',`',`',`} else {
|
||||
$3
|
||||
')}
|
||||
')
|
||||
|
@ -5,9 +5,10 @@
|
||||
/require \{/,/} # end require/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:]]*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:]]*bool /s/^/# this line was moved by the build process: &/
|
||||
|
||||
:nextline
|
||||
|
@ -5,7 +5,7 @@
|
||||
/require \{/,/} # end require/b nextline
|
||||
/optional \{/,/} # end optional/b nextline
|
||||
|
||||
/^[[:blank:]]*(attribute|type(alias)?) /{
|
||||
/^[[:blank:]]*(attribute|type(alias)?|bool) /{
|
||||
s/^[[:blank:]]+//
|
||||
p
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user