Skip to content

Commit

Permalink
powerpc/xmon: Paginate kernel log buffer display
Browse files Browse the repository at this point in the history
The kernel log buffer is often much longer than the size of a terminal
so paginate it's output.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Sam bobroff authored and Michael Ellerman committed Oct 15, 2015
1 parent 958b7c8 commit 0c23a88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ Commands:\n\
" u dump TLB\n"
#endif
" ? help\n"
#ifdef CONFIG_PPC64
" # n limit output to n lines per page (dump paca only)\n"
#endif
" # n limit output to n lines per page (for dp, dpa, dl)\n"
" zr reboot\n\
zh halt\n"
;
Expand Down Expand Up @@ -2333,10 +2331,12 @@ dump_log_buf(void)
sync();

kmsg_dump_rewind_nolock(&dumper);
xmon_start_pagination();
while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) {
buf[len] = '\0';
printf("%s", buf);
}
xmon_end_pagination();

sync();
/* wait a little while to see if we get a machine check */
Expand Down

0 comments on commit 0c23a88

Please sign in to comment.