Skip to content

Commit

Permalink
kconfig: Fix missing declaration of variable $dir in streamline_confi…
Browse files Browse the repository at this point in the history
…g.pl

On Fri, Aug 17, 2010 at 01:43PM +0800, Américo Wang wrote:
> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>
> BTW, I think we should add "use strict;" too.

Then I added "use strict;" to streamline_config.pl, I saw another
warning.

> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 286.
> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 287.
> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 288.

Then I added "my $dir;" to line 285.

Cc: Américo Wang <xiyou.wangcong@gmail.com>
Cc: Toralf Foerster <toralf.foerster@gmx.de>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hiromu Yakura <hiromu1996@gmail.com>
LKML-Reference: <1282042158.7160.9.camel@hiromu-Macbook>

[ changed to just add my in front of $dir instead of new line ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
hiromu authored and rostedt committed Oct 29, 2010
1 parent ccece60 commit cf5a189
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
# mv config_strip .config
# make oldconfig
#
use strict;

my $config = ".config";

my $uname = `uname -r`;
Expand Down Expand Up @@ -291,7 +293,7 @@ sub read_kconfig {
# see what modules are loaded on this system
my $lsmod;

foreach $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) {
foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) {
if ( -x "$dir/lsmod" ) {
$lsmod = "$dir/lsmod";
last;
Expand Down

0 comments on commit cf5a189

Please sign in to comment.