[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081106102958.GA6052@hack.voiplan.pt>
Date: Thu, 6 Nov 2008 10:29:58 +0000
From: Américo Wang <xiyou.wangcong@...il.com>
To: Arjan van de Ven <arjan@...radead.org>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
torvalds@...ux-foundation.org, mingo@...e.hu,
Randy Dunlap <randy.dunlap@...cle.com>
Subject: Re: [PATCH] scripts: script from kerneloops.org to pretty print
oops dumps
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@...ux.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."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists