Commit c25f4157 authored by Amerigo Wang's avatar Amerigo Wang Committed by Michal Marek

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarAmerigo Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 03ee0c42
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment