History

kconfig: Hide error output in find command in streamline_config.pl

Finding the list of Makefiles in streamline-config should not report errors. Also move the "chomp" to the @makefiles array instead of doing it in the for loop. This is more efficient, and does not make it any less readable by C programmers.

Toralf Förster committed 16 years ago

Commit 17431921 parent 1d1d1fe1 file · +3 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kconfig/streamline_config.pl+3−2
@@ -115,7 +115,9 @@ my $ksource = $ARGV[0]; · 114 unmodified lines
115115 my $kconfig = $ARGV[1];
116116 my $lsmod_file = $ARGV[2];
117117
118−my @makefiles = `find $ksource -name Makefile`;
118+my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
119+chomp @makefiles;
120+
119121 my %depends;
120122 my %selects;
121123 my %prompts;
@@ -215,7 +217,6 @@ if ($kconfig) { · 93 unmodified lines
215217
216218 # Read all Makefiles to map the configs to the objects
217219 foreach my $makefile (@makefiles) {
218− chomp $makefile;
219220
220221 open(MIN,$makefile) || die "Can't open $makefile";
221222 while (<MIN>) {