public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Fix wrong source path in scripts/namespace.pl
@ 2010-09-30  6:28 Amerigo Wang
  2010-09-30  6:28 ` [PATCH 2/4] namespace.pl: update file exclusion list Amerigo Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Amerigo Wang @ 2010-09-30  6:28 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Amerigo Wang, Stephen Hemminger, Andrew Morton, Michal Marek,
	linux-kernel

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>
---
 scripts/namespace.pl |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/namespace.pl b/scripts/namespace.pl
index 361d0f7..fb4e245 100755
--- a/scripts/namespace.pl
+++ b/scripts/namespace.pl
@@ -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
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-01  6:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-30  6:28 [PATCH 1/4] Fix wrong source path in scripts/namespace.pl Amerigo Wang
2010-09-30  6:28 ` [PATCH 2/4] namespace.pl: update file exclusion list Amerigo Wang
2010-09-30  6:28 ` [PATCH 3/4] Some bug fixes for namespace.pl Amerigo Wang
2010-09-30  6:28 ` [PATCH 4/4] Improve namespace.pl to get more correct result Amerigo Wang
2010-09-30  7:01 ` [PATCH 1/4] Fix wrong source path in scripts/namespace.pl Stephen Hemminger
2010-10-01  5:56 ` Stephen Hemminger
2010-10-01  6:28   ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox