diff options
author | Amerigo Wang <amwang@redhat.com> | 2010-10-27 15:42:00 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-10-27 18:07:45 -0400 |
commit | c25f415751c0c5507561d997fe5f7f05f4342912 (patch) | |
tree | 61988f838a5a68b3526235bc4b8388ecde414a0f /scripts/namespace.pl | |
parent | 03ee0c42a77fbf60bfa6b0eacaff30ae4e19fce8 (diff) |
scripts/namespace.pl: fix wrong source path
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>
Diffstat (limited to 'scripts/namespace.pl')
-rwxr-xr-x | scripts/namespace.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/namespace.pl b/scripts/namespace.pl index 361d0f71184b..fb4e24560736 100755 --- a/scripts/namespace.pl +++ b/scripts/namespace.pl | |||
@@ -167,11 +167,11 @@ sub do_nm | |||
167 | printf STDERR "$fullname is not an object file\n"; | 167 | printf STDERR "$fullname is not an object file\n"; |
168 | return; | 168 | return; |
169 | } | 169 | } |
170 | ($source = $fullname) =~ s/\.o$//; | 170 | ($source = $basename) =~ s/\.o$//; |
171 | if (-e "$objtree$source.c" || -e "$objtree$source.S") { | 171 | if (-e "$source.c" || -e "$source.S") { |
172 | $source = "$objtree$source"; | 172 | $source = "$objtree$File::Find::dir/$source"; |
173 | } else { | 173 | } else { |
174 | $source = "$srctree$source"; | 174 | $source = "$srctree$File::Find::dir/$source"; |
175 | } | 175 | } |
176 | if (! -e "$source.c" && ! -e "$source.S") { | 176 | if (! -e "$source.c" && ! -e "$source.S") { |
177 | # No obvious source, exclude the object if it is conglomerate | 177 | # No obvious source, exclude the object if it is conglomerate |