From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:9203 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752779Ab0I3GYg (ORCPT ); Thu, 30 Sep 2010 02:24:36 -0400 From: Amerigo Wang Subject: [PATCH 1/4] Fix wrong source path in scripts/namespace.pl Date: Thu, 30 Sep 2010 14:28:55 +0800 Message-Id: <1285828138-5873-1-git-send-email-amwang@redhat.com> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: linux-kbuild@vger.kernel.org Cc: Amerigo Wang , Stephen Hemminger , Andrew Morton , Michal Marek , linux-kernel@vger.kernel.org File::Find will do chdir automatically, so we need to get the absolute patch with $File::Find::dir. Reported-by: Stephen Hemminger Signed-off-by: Amerigo Wang --- 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