History

markup_oops: use modinfo to avoid confusion with underscored module names

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.

Ozan Çaglayan committed 17 years ago

Commit 82fa3951 parent f9d490a1 file · +1 −4Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/markup_oops.pl+1−4
@@ -184,10 +184,7 @@ if ($target eq "0") { · 183 unmodified lines
184 184
185# if it's a module, we need to find the .ko file and calculate a load offset185# if it's a module, we need to find the .ko file and calculate a load offset
186if ($module ne "") {186if ($module ne "") {
187 my $dir = dirname($filename);187 my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`;
188 $dir = $dir . "/";
189 my $mod = $module . ".ko";
190 my $modulefile = `find $dir -name $mod | head -1`;
191 chomp($modulefile);188 chomp($modulefile);
192 $filename = $modulefile;189 $filename = $modulefile;
193 if ($filename eq "") {190 if ($filename eq "") {