generate-config.pl: Be more verbose about missing options

For instance, the current 3.10 kernel build fails at the end with:

unused option: BRCMFMAC_PCIE
unused option: FW_LOADER_USER_HELPER_FALLBACK
unused option: KEXEC_FILE
unused option: RANDOMIZE_BASE

However, it's not obvious that only the _last_ one is actually fatal to
the build. After this change it's at least somewhat better:

warning: unused option: BRCMFMAC_PCIE
warning: unused option: FW_LOADER_USER_HELPER_FALLBACK
warning: unused option: KEXEC_FILE
error: unused option: RANDOMIZE_BASE
This commit is contained in:
Tuomas Tynkkynen 2016-08-06 16:21:46 +03:00
parent 20f009d56d
commit 44f462bf4d

View File

@ -134,7 +134,7 @@ close CONFIG;
foreach my $name (sort (keys %answers)) {
my $f = $requiredAnswers{$name} && $ENV{'ignoreConfigErrors'} ne "1"
? sub { die @_; } : sub { warn @_; };
? sub { die "error: " . $_[0]; } : sub { warn "warning: " . $_[0]; };
&$f("unused option: $name\n") unless defined $config{$name};
&$f("option not set correctly: $name\n")
if $config{$name} && $config{$name} ne $answers{$name};