提交 0c23a88c 编写于 作者: S Sam bobroff 提交者: Michael Ellerman

powerpc/xmon: Paginate kernel log buffer display

The kernel log buffer is often much longer than the size of a terminal
so paginate it's output.
Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 958b7c80
...@@ -242,9 +242,7 @@ Commands:\n\ ...@@ -242,9 +242,7 @@ Commands:\n\
" u dump TLB\n" " u dump TLB\n"
#endif #endif
" ? help\n" " ? help\n"
#ifdef CONFIG_PPC64 " # n limit output to n lines per page (for dp, dpa, dl)\n"
" # n limit output to n lines per page (dump paca only)\n"
#endif
" zr reboot\n\ " zr reboot\n\
zh halt\n" zh halt\n"
; ;
...@@ -2333,10 +2331,12 @@ dump_log_buf(void) ...@@ -2333,10 +2331,12 @@ dump_log_buf(void)
sync(); sync();
kmsg_dump_rewind_nolock(&dumper); kmsg_dump_rewind_nolock(&dumper);
xmon_start_pagination();
while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) { while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) {
buf[len] = '\0'; buf[len] = '\0';
printf("%s", buf); printf("%s", buf);
} }
xmon_end_pagination();
sync(); sync();
/* wait a little while to see if we get a machine check */ /* wait a little while to see if we get a machine check */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册