Skip to contentSkip to conversation

markup_oops: use modinfo to avoid confusion with underscored module names

PATCH In review [email protected] 1 participant 1 message Sep 18, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 8/18 markup_oops: use modinfo to avoid confusion with underscored module names

From: Ozan Çaglayan <[email protected]>

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.

---

 scripts/markup_oops.pl |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
scripts/markup_oops.pl renamed from scripts/markup_oops.pl~markup_oops-use-modinfo-to-avoid-confusion-with-underscored-module-names +1 -4
diff -puN scripts/markup_oops.pl~markup_oops-use-modinfo-to-avoid-confusion-with-underscored-module-names 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 "") {

_