kernel generate-config.pl: Show all errors, not just the first
This makes it less frustrating to add a large group of kernel options via boot.kernelPatches.*.extraConfig. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
9e144d5527
commit
04577a28d6
|
@ -136,10 +136,12 @@ while (<CONFIG>) {
|
||||||
}
|
}
|
||||||
close CONFIG;
|
close CONFIG;
|
||||||
|
|
||||||
|
my $ret = 0;
|
||||||
foreach my $name (sort (keys %answers)) {
|
foreach my $name (sort (keys %answers)) {
|
||||||
my $f = $requiredAnswers{$name} && $ignoreConfigErrors ne "1"
|
my $f = $requiredAnswers{$name} && $ignoreConfigErrors ne "1"
|
||||||
? sub { die "error: " . $_[0]; } : sub { warn "warning: " . $_[0]; };
|
? sub { warn "error: " . $_[0]; $ret = -1; } : sub { warn "warning: " . $_[0]; };
|
||||||
&$f("unused option: $name\n") unless defined $config{$name};
|
&$f("unused option: $name\n") unless defined $config{$name};
|
||||||
&$f("option not set correctly: $name (wanted '$answers{$name}', got '$config{$name}')\n")
|
&$f("option not set correctly: $name (wanted '$answers{$name}', got '$config{$name}')\n")
|
||||||
if $config{$name} && $config{$name} ne $answers{$name};
|
if $config{$name} && $config{$name} ne $answers{$name};
|
||||||
}
|
}
|
||||||
|
exit $ret;
|
||||||
|
|
Loading…
Reference in New Issue