* [Patch]Fix reason_str of pstore so that it can work correctly
@ 2012-03-07 21:17 Seiji Aguchi
2012-03-16 8:18 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: Seiji Aguchi @ 2012-03-07 21:17 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, Luck, Tony (tony.luck@intel.com),
Chen Gong (gong.chen@linux.intel.com),
Matthew Garrett (mjg@redhat.com), dzickus@redhat.com
Cc: dle-develop@lists.sourceforge.net, Satoru Moriya
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"
};
/*
-- 1.7.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch]Fix reason_str of pstore so that it can work correctly
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
2012-03-16 13:38 ` Seiji Aguchi
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2012-03-16 8:18 UTC (permalink / raw)
To: Seiji Aguchi
Cc: linux-kernel@vger.kernel.org, Luck, Tony (tony.luck@intel.com),
Chen Gong (gong.chen@linux.intel.com),
Matthew Garrett (mjg@redhat.com), dzickus@redhat.com,
dle-develop@lists.sourceforge.net, Satoru Moriya
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";
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [Patch]Fix reason_str of pstore so that it can work correctly
2012-03-16 8:18 ` Adrian Hunter
@ 2012-03-16 13:38 ` Seiji Aguchi
0 siblings, 0 replies; 3+ messages in thread
From: Seiji Aguchi @ 2012-03-16 13:38 UTC (permalink / raw)
To: Adrian Hunter
Cc: linux-kernel@vger.kernel.org, Luck, Tony (tony.luck@intel.com),
Chen Gong (gong.chen@linux.intel.com),
Matthew Garrett (mjg@redhat.com), dzickus@redhat.com,
dle-develop@lists.sourceforge.net, Satoru Moriya
Hi,
Thank you for reviewing my patch.
I will update it in accordance with your comment.
Seiji
> 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";
> }
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-16 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-03-16 13:38 ` Seiji Aguchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox