From 82fa39552fd858468a5647fa58d14955ecd50eb4 Mon Sep 17 00:00:00 2001 From: Ozan Çaglayan Date: Fri, 18 Sep 2009 12:49:27 -0700 Subject: markup_oops: use modinfo to avoid confusion with underscored module names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When EIP is at a module having an underscore in its name, the current code fails to find it because the module filenames has '-' instead of '_'. Use modinfo for a better path finding. Signed-off-by: Ozan Çaglayan Acked-by: WANG Cong Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- scripts/markup_oops.pl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index 89774011965..5f0fcb712e2 100644 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl @@ -184,10 +184,7 @@ if ($target eq "0") { # if it's a module, we need to find the .ko file and calculate a load offset if ($module ne "") { - my $dir = dirname($filename); - $dir = $dir . "/"; - my $mod = $module . ".ko"; - my $modulefile = `find $dir -name $mod | head -1`; + my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`; chomp($modulefile); $filename = $modulefile; if ($filename eq "") { -- cgit v1.2.3-70-g09d2