This will be used to filter out some autogenerated config values from
the kernel config files
Signed-off-by: Felix Fietkau <nbd@nbd.name>
my $cfg1 = shift;
my $cfg2 = shift;
my %config = %{$cfg1};
-
- foreach my $config (keys %$cfg2) {
+ my @keys = map {
+ my $expr = $_;
+ $expr =~ /[?.*]/ ?
+ map {
+ /^$expr$/ ? $_ : ()
+ } keys %config : $expr;
+ } keys %$cfg2;
+
+ foreach my $config (@keys) {
delete $config{$config};
}
return \%config;