From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: "Ozan Çağlayan" <ozan@pardus.org.tr>
Cc: linux-kernel@vger.kernel.org, arjan@infradead.org
Subject: Re: [PATCH v2] markup_oops: Use modinfo to avoid confusion with underscored module names
Date: Mon, 10 Aug 2009 22:37:25 +0800 [thread overview]
Message-ID: <20090810143725.GA7173@hack> (raw)
In-Reply-To: <1249895593-23567-1-git-send-email-ozan@pardus.org.tr>
On Mon, Aug 10, 2009 at 12:13:13PM +0300, Ozan Çağlayan wrote:
>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 Çağlayan <ozan@pardus.org.tr>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Thanks!
>---
> scripts/markup_oops.pl | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
>diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
>index 8977401..5f0fcb7 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 "") {
>--
>1.6.3.4
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
--
Live like a child, think like the god.
prev parent reply other threads:[~2009-08-10 14:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 12:21 [PATCH] markup_oops: Use modinfo to avoid confusion with underscored module names Ozan Çağlayan
2009-08-06 14:11 ` Arjan van de Ven
2009-08-06 15:32 ` Ozan Çağlayan
2009-08-07 1:42 ` Amerigo Wang
2009-08-10 9:13 ` [PATCH v2] " Ozan Çağlayan
2009-08-10 14:37 ` Américo Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090810143725.GA7173@hack \
--to=xiyou.wangcong@gmail.com \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ozan@pardus.org.tr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox