Skip to content

Commit 4707c13

Browse files
Baoquan Heakpm00
authored andcommitted
crash: add prefix for crash dumping messages
Add pr_fmt() to kernel/crash_core.c to add the module name to debugging message printed as prefix. And also add prefix 'crashkernel:' to two lines of message printing code in kernel/crash_reserve.c. In kernel/crash_reserve.c, almost all debugging messages have 'crashkernel:' prefix or there's keyword crashkernel at the beginning or in the middle, adding pr_fmt() makes it redundant. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Baoquan He <[email protected]> Cc: Dave Young <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 055e09a commit 4707c13

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

kernel/crash_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Copyright (C) 2002-2004 Eric Biederman <[email protected]>
55
*/
66

7+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
8+
79
#include <linux/buildid.h>
810
#include <linux/init.h>
911
#include <linux/utsname.h>

kernel/crash_reserve.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
109109

110110
size = memparse(cur, &tmp);
111111
if (cur == tmp) {
112-
pr_warn("Memory value expected\n");
112+
pr_warn("crashkernel: Memory value expected\n");
113113
return -EINVAL;
114114
}
115115
cur = tmp;
@@ -132,7 +132,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
132132
cur++;
133133
*crash_base = memparse(cur, &tmp);
134134
if (cur == tmp) {
135-
pr_warn("Memory value expected after '@'\n");
135+
pr_warn("crahskernel: Memory value expected after '@'\n");
136136
return -EINVAL;
137137
}
138138
}

0 commit comments

Comments
 (0)