Skip to content

Commit

Permalink
scripts/namespace.pl: fix wrong source path
Browse files Browse the repository at this point in the history
File::Find will do chdir automatically, so we need to get the absolute
patch with $File::Find::dir.

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Amerigo Wang authored and Michal Marek committed Oct 27, 2010
1 parent 03ee0c4 commit c25f415
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/namespace.pl
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ sub do_nm
printf STDERR "$fullname is not an object file\n";
return;
}
($source = $fullname) =~ s/\.o$//;
if (-e "$objtree$source.c" || -e "$objtree$source.S") {
$source = "$objtree$source";
($source = $basename) =~ s/\.o$//;
if (-e "$source.c" || -e "$source.S") {
$source = "$objtree$File::Find::dir/$source";
} else {
$source = "$srctree$source";
$source = "$srctree$File::Find::dir/$source";
}
if (! -e "$source.c" && ! -e "$source.S") {
# No obvious source, exclude the object if it is conglomerate
Expand Down

0 comments on commit c25f415

Please sign in to comment.