[PATCH 2/5] scripts/kconfig.pl: modify config_and()/config_sub() to match other ops
Elliott Mitchell
ehem+openwrt at m5p.com
Thu Nov 30 15:23:02 PST 2023
Having all operator-handling functions match the same prototype has
advantages.
Signed-off-by: Elliott Mitchell <ehem+openwrt at m5p.com>
---
scripts/kconfig.pl | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/kconfig.pl b/scripts/kconfig.pl
index f7b3814cdd..dd286479b3 100755
--- a/scripts/kconfig.pl
+++ b/scripts/kconfig.pl
@@ -43,8 +43,8 @@ sub load_config($$) {
}
-sub config_and($$) {
- my ($cfg1, $cfg2) = @_;
+sub config_and($$$) {
+ my ($cfg1, $cfg2, $mod_plus_discarded) = @_;
my %config;
foreach my $config (keys %$cfg1) {
@@ -89,8 +89,8 @@ sub config_diff($$$) {
return \%config
}
-sub config_sub($$) {
- my ($cfg1, $cfg2) = @_;
+sub config_sub($$$) {
+ my ($cfg1, $cfg2, $mod_plus_discarded) = @_;
my %config = %{$cfg1};
my @keys = map {
my $expr = $_;
@@ -135,7 +135,7 @@ sub parse_expr {
if ($arg eq '&') {
my $arg1 = parse_expr($pos);
my $arg2 = parse_expr($pos);
- return config_and($arg1, $arg2);
+ return config_and($arg1, $arg2, undef);
} elsif ($arg =~ /^\+/) {
my $arg1 = parse_expr($pos);
my $arg2 = parse_expr($pos);
@@ -155,7 +155,7 @@ sub parse_expr {
} elsif ($arg eq '-') {
my $arg1 = parse_expr($pos);
my $arg2 = parse_expr($pos);
- return config_sub($arg1, $arg2);
+ return config_sub($arg1, $arg2, undef);
} else {
return load_config($arg, $mod_plus);
}
--
(\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/)
\BS ( | ehem+openwrt at m5p.com PGP 87145445 | ) /
\_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
More information about the openwrt-devel
mailing list