Signed-off-by: Shogo Matsumoto <shogo.matsumoto(a)fujitsu.com>
---
kernel.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/kernel.c b/kernel.c
index 993913c..f9e8763 100644
--- a/kernel.c
+++ b/kernel.c
@@ -11612,6 +11612,9 @@ __dump_printk_safe_seq_buf(char *buf_name, int msg_flags)
else
ilen = strlen(buf_name) + 3; // "[%s] "
}
+ if (msg_flags & SHOW_LOG_LEVEL)
+ ilen += 3; // "<%c>"
+
readmem(buffer_addr + per_cpu_offset, KVADDR,
buffer, buffer_size,
"printk_safe_seq_buf buffer", FAULT_ON_ERROR);
@@ -11632,6 +11635,14 @@ __dump_printk_safe_seq_buf(char *buf_name, int msg_flags)
else if (!(msg_flags & SHOW_LOG_TEXT))
fprintf(fp, "[%s] ", buf_name);
+ if ((msg_flags & SHOW_LOG_LEVEL) && (i < n)) {
+ switch (*p) {
+ case '0' ... '7':
+ case 'c':
+ fprintf(fp, "<%c>", *p);
+ }
+ }
+
continue;
} else {
if (sol)
--
2.29.2
Show replies by date