diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2021-03-07 13:25:32 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2021-03-07 13:32:55 +0100 |
commit | fb72952d5b63e40f63bfa1e3a5bce2262c424197 (patch) | |
tree | d1a9bf30437653b57b398fd3b4f3fb4897ca29cd /scripts/check-configs.pl | |
parent | b9488a288ec844af97a516ac9ffe441221f6e67d (diff) | |
parent | 3422e04a2e31dba3e17af206f160d4fc409f4250 (diff) | |
download | kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.tar.gz kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.tar.xz kernel-fb72952d5b63e40f63bfa1e3a5bce2262c424197.zip |
:merge origin/stabilization and update to 5.10.4kernel-5.11.4-125.vanilla.1.fc33kernel-5.11.4-125.vanilla.1.fc32
Diffstat (limited to 'scripts/check-configs.pl')
-rw-r--r-- | scripts/check-configs.pl | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/scripts/check-configs.pl b/scripts/check-configs.pl deleted file mode 100644 index c74acf1d4..000000000 --- a/scripts/check-configs.pl +++ /dev/null @@ -1,83 +0,0 @@ -# By Paul Bolle October 2014. -# -# Contributed to the public domain by its author. - -use 5.016; -use warnings; -use autodie; - -use File::Find; - -my @Kconfigs; - -my $Kconfigre = qr/Kconfig.*/; -my $configre = qr/^\s*(menu)?config\s+(?<config>(\w+))$/; -my $CONFIG_re = qr/\bCONFIG_(?<CONFIG_>(\w+))/; - -sub match { - push( @Kconfigs, $File::Find::name ) if ($_ =~ $Kconfigre); -} - -sub parse_kconfig { - my ($path) = @_; - - my @ret; - - open( my $kconfig, "<", $path ); - my $slurp = do { local $/ = undef; <$kconfig> }; - close( $kconfig ); - my @lines = split ( /\n/, $slurp ); - foreach my $line (@lines) { - if ($line =~ /$configre/) { - push( @ret, $+{config} ); - } - } - - @ret; -} - -sub parse_shipped { - my ($path) = @_; - - my @ret; - - open( my $shipped, "<", $path ); - my $slurp = do { local $/ = undef; <$shipped> }; - close( $shipped ); - my @lines = split ( /\n/, $slurp ); - my $i = 1; - foreach my $line (@lines) { - if ($line =~ /$CONFIG_re/) { - push( @ret, [$i, $+{CONFIG_}] ); - } - $i++; - } - - @ret; -} - -exit main ( @ARGV ); - -sub main { - my %configs; - - find( \&match, @_ ); - - foreach my $Kconfig (@Kconfigs) { - my (@tmp) = parse_kconfig( $Kconfig ); - foreach my $config ( @tmp ) { - $configs{ $config }++; - } - } - - foreach my $shipped (glob("*.config")) { - my (@tmp) = parse_shipped( $shipped ); - foreach my $ref ( @tmp ) { - say( STDERR "$shipped:$ref->[0]: No Kconfig symbol matches 'CONFIG_$ref->[1]'" ) - unless (grep( /^$ref->[1]$/, keys( %configs ))); - } - } - - 0; -} - |