mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, mingo@elte.hu,
	Randy Dunlap <randy.dunlap@oracle.com>
Subject: Re: [PATCH] scripts: script from kerneloops.org to pretty print oops dumps
Date: Thu, 6 Nov 2008 10:29:58 +0000	[thread overview]
Message-ID: <20081106102958.GA6052@hack.voiplan.pt> (raw)
In-Reply-To: <20081105190726.31952581@infradead.org>

On Wed, Nov 05, 2008 at 07:07:26PM -0800, Arjan van de Ven wrote:
>Hi,
>

Hi,

thanks for your work!

>
>diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
>new file mode 100644
>index 0000000..c8a2200
>--- /dev/null
>+++ b/scripts/markup_oops.pl
>@@ -0,0 +1,165 @@
>+#!/usr/bin/perl -w
>+
>+# Copyright 2008, Intel Corporation
>+#
>+# This file is part of the Linux kernel
>+#
>+# This program file is free software; you can redistribute it and/or modify it
>+# under the terms of the GNU General Public License as published by the
>+# Free Software Foundation; version 2 of the License.
>+#
>+# Authors:
>+# 	Arjan van de Ven <arjan@linux.intel.com>
>+
>+
>+my $vmlinux_name = $ARGV[0];
>+
>+#
>+# Step 1: Parse the oops to find the EIP value
>+# 
>+
>+my $target = "0";
>+while (<STDIN>) {
>+  if ($_ =~ /EIP: 0060:\[\<([a-z0-9]+)\>\]/) {
>+      $target = $1;
>+  }
>+}
>+
>+if ($target =~ /^f8/) {
>+  print "This script does not work on modules ... \n";
>+  exit;
>+}
>+
>+if ($target eq "0") {
>+  print "No oops found!\n";
>+  print "Usage: \n";
>+  print "    dmesg | perl scripts/markup_oops.pl vmlinux\n";
>+  exit;


One thing to note here, no oops doesn't always mean wrong usage. :)
So I think usage should be printed only when the usage is actually
wrong, e.g. ARGV[0] is missed.



>+$start = $center;
>+$codelines = 0;
>+$binarylines = 0;

Why not fold these lines into their definitions?


-- 
"Sometimes the only way to stay sane is to go a little crazy."


  parent reply	other threads:[~2008-11-06 10:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06  3:07 Arjan van de Ven
2008-11-06  4:15 ` Keith Owens
2008-11-06  5:36   ` Arjan van de Ven
2008-11-06 10:29 ` Américo Wang [this message]
2008-11-23 21:00 Arjan van de Ven
2008-11-26  7:24 ` Ingo Molnar
2008-11-26  8:12   ` Andrew Morton
2008-11-26  8:27     ` Ingo Molnar
2008-11-26 14:09     ` Andi Kleen
2008-11-26  8:18 ` Vegard Nossum
2008-11-26 14:49   ` Arjan van de Ven

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=20081106102958.GA6052@hack.voiplan.pt \
    --to=xiyou.wangcong@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=randy.dunlap@oracle.com \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®