[PATCH v3 4/7] log: add support -t option for output of printk safe buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Suppress the output of safe buffer name if -t is specified to 'log'.

Signed-off-by: Shogo Matsumoto <shogo.matsumoto@xxxxxxxxxxx>
---
 kernel.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel.c b/kernel.c
index 138ac3c..993913c 100644
--- a/kernel.c
+++ b/kernel.c
@@ -11607,7 +11607,10 @@ __dump_printk_safe_seq_buf(char *buf_name, int msg_flags)
 			if (show_header) {
 				ilen = PRINTK_SAFE_SEQ_BUF_INDENT;
 			} else {
-				ilen = strlen(buf_name) + 3; // "[%s] "
+				if (msg_flags & SHOW_LOG_TEXT)
+					ilen = 0;
+				else
+					ilen = strlen(buf_name) + 3; // "[%s] "
 			}
 			readmem(buffer_addr + per_cpu_offset, KVADDR,
 				buffer, buffer_size,
@@ -11626,7 +11629,7 @@ __dump_printk_safe_seq_buf(char *buf_name, int msg_flags)
 
 					if (show_header)
 						fprintf(fp, space(PRINTK_SAFE_SEQ_BUF_INDENT));
-					else
+					else if (!(msg_flags & SHOW_LOG_TEXT))
 						fprintf(fp, "[%s] ", buf_name);
 
 					continue;
-- 
2.29.2


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux