From: Adrian Hunter <adrian.hunter@intel.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Luck, Tony (tony.luck@intel.com)" <tony.luck@intel.com>,
"Chen Gong (gong.chen@linux.intel.com)"
<gong.chen@linux.intel.com>,
"Matthew Garrett (mjg@redhat.com)" <mjg@redhat.com>,
"dzickus@redhat.com" <dzickus@redhat.com>,
"dle-develop@lists.sourceforge.net"
<dle-develop@lists.sourceforge.net>,
Satoru Moriya <satoru.moriya@hds.com>
Subject: Re: [Patch]Fix reason_str of pstore so that it can work correctly
Date: Fri, 16 Mar 2012 10:18:02 +0200 [thread overview]
Message-ID: <4F62F73A.6020108@intel.com> (raw)
In-Reply-To: <5C4C569E8A4B9B42A84A977CF070A35B2DACC35686@USINDEVS01.corp.hds.com>
On 07/03/12 23:17, Seiji Aguchi wrote:
> Hi,
>
> Recently, there has been some changes in kmsg_dump() below.
> (1) kmsg_dump(KMSG_DUMP_KEXEC) was removed.
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=a3dd3323058d281abd584b15ad4c5b65064d7a61
>
> (2) A order of "enum kmsg_dump_reason" was modified.
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=c22ab332902333f83766017478c1ef6607ace681
>
> These above patches modified kmsg_dump_reason in include/linux/kmsg_dump.h.
> But reason_str in fs/pstore/platform.c was not modified.
>
> This patch just fixes reason_str in fs/pstore/platform.c so that pstore can work correctly.
>
> Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
>
> ---
> fs/pstore/platform.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 9ec22d3..81f4748 100644
> --- a/fs/pstore/platform.c
> +++ b/fs/pstore/platform.c
> @@ -69,7 +69,7 @@ void pstore_set_kmsg_bytes(int bytes)
> static int oopscount;
>
> static char *reason_str[] = {
> - "Oops", "Panic", "Kexec", "Restart", "Halt", "Poweroff", "Emergency"
> + "Panic", "Oops", "Emergency", "Restart", "Halt", "Poweroff"
> };
It would be better to make it so it would not break e.g.
static const char *get_reason_str(enum kmsg_dump_reason reason) {
switch (reason) {
KMSG_DUMP_PANIC:
return "Panic";
KMSG_DUMP_OOPS:
return "Oops";
KMSG_DUMP_EMERG:
return "Emergency";
KMSG_DUMP_RESTART:
return "Restart";
KMSG_DUMP_HALT:
return "Halt";
KMSG_DUMP_POWEROFF:
return "Poweroff";
default:
return "Unknown";
}
}
next prev parent reply other threads:[~2012-03-16 8:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 21:17 [Patch]Fix reason_str of pstore so that it can work correctly Seiji Aguchi
2012-03-16 8:18 ` Adrian Hunter [this message]
2012-03-16 13:38 ` Seiji Aguchi
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=4F62F73A.6020108@intel.com \
--to=adrian.hunter@intel.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=dzickus@redhat.com \
--cc=gong.chen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=satoru.moriya@hds.com \
--cc=seiji.aguchi@hds.com \
--cc=tony.luck@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.