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>
This commit is contained in:
parent
03ee0c42a7
commit
c25f415751
1 changed files with 4 additions and 4 deletions
|
@ -167,11 +167,11 @@ sub do_nm
|
||||||
printf STDERR "$fullname is not an object file\n";
|
printf STDERR "$fullname is not an object file\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
($source = $fullname) =~ s/\.o$//;
|
($source = $basename) =~ s/\.o$//;
|
||||||
if (-e "$objtree$source.c" || -e "$objtree$source.S") {
|
if (-e "$source.c" || -e "$source.S") {
|
||||||
$source = "$objtree$source";
|
$source = "$objtree$File::Find::dir/$source";
|
||||||
} else {
|
} else {
|
||||||
$source = "$srctree$source";
|
$source = "$srctree$File::Find::dir/$source";
|
||||||
}
|
}
|
||||||
if (! -e "$source.c" && ! -e "$source.S") {
|
if (! -e "$source.c" && ! -e "$source.S") {
|
||||||
# No obvious source, exclude the object if it is conglomerate
|
# No obvious source, exclude the object if it is conglomerate
|
||||||
|
|
Loading…
Reference in a new issue