X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=blobdiff_plain;f=scripts%2Fkconfig.pl;h=45c565e7a992c06e36cb64acd73a54fa65b4b0a1;hp=811327353867f8303f4c226f5c84b3f4c5bb47ec;hb=2729ebed04a4bf447ee95116a1ed13feccd7829e;hpb=25960d9281704dc093e032bc1b7e2f31915de1b9 diff --git a/scripts/kconfig.pl b/scripts/kconfig.pl index 8113273538..45c565e7a9 100755 --- a/scripts/kconfig.pl +++ b/scripts/kconfig.pl @@ -29,7 +29,7 @@ sub load_config($$) { my $mod_plus = shift; my %config; - open FILE, "$file" or die "can't open file"; + open FILE, "$file" or die "can't open file '$file'"; while () { chomp; /^$PREFIX(.+?)=(.+)/ and do { @@ -73,7 +73,10 @@ sub config_add($$$) { my %cfg = %$_; foreach my $config (keys %cfg) { - next if $mod_plus and $config{$config} and $config{$config} eq "y"; + if ($mod_plus and $config{$config}) { + next if $config{$config} eq "y"; + next if $cfg{$config} eq '#undef'; + } $config{$config} = $cfg{$config}; } }