[kernel] r6026 - in people/tbm: . utils
Martin Michlmayr
tbm at costa.debian.org
Thu Mar 2 15:18:01 UTC 2006
Author: tbm
Date: Thu Mar 2 15:17:59 2006
New Revision: 6026
Added:
people/tbm/
people/tbm/utils/
people/tbm/utils/compare-configs (contents, props changed)
Log:
add a hack I'm using until there's something better
Added: people/tbm/utils/compare-configs
==============================================================================
--- (empty file)
+++ people/tbm/utils/compare-configs Thu Mar 2 15:17:59 2006
@@ -0,0 +1,46 @@
+#!/usr/bin/perl -w
+
+sub parse_config_line($) {
+ my $line = pop;
+ my ($var, $val);
+
+ if ($line =~ /(\w+)=(.*)/) {
+ $var = $1;
+ $val = $2;
+ } elsif ($line =~ /(\w+) is not set/) {
+ $var = $1;
+ $val = "not set";
+ }
+ return ($var, $val);
+}
+
+my %global_config;
+open(O, "config");
+while (<O>) {
+ my($var, $val) = parse_config_line($_);
+ $global_config{$var} = $val if $var;
+}
+close(O);
+
+my @configs = qw(mips/config.r4k-ip22 mips/config.r5k-ip32 mips/config.sb1-bcm91250a
+ mipsel/config.r5k-cobalt mipsel/config.sb1-bcm91250a);
+
+for my $config (@configs) {
+ print "Processing $config\n";
+ my %config;
+ open(C, $config) or die "Cannot open file $config: $!";
+ while(<C>) {
+ my($var, $val) = parse_config_line($_);
+ $config{$var} = $val if $var;
+ }
+ close(C);
+ for my $var (sort keys %global_config) {
+ if (! $config{$var}) {
+ print "Diff in $var: '$global_config{$var}' vs -\n";
+ } elsif ($global_config{$var} ne $config{$var}) {
+ print "Diff in $var: '$global_config{$var}' vs '$config{$var}'\n";
+ }
+ }
+ print "\n";
+}
+
More information about the Kernel-svn-changes
mailing list