Skip to content

Commit d1871b3

Browse files
committed
kdb: Fix dmesg/bta scroll to quit with 'q'
If you press 'q' the pager should exit instead of printing everything from dmesg which can really bog down a 9600 baud serial link. The same is true for the bta command. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
1 parent 24b8592 commit d1871b3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

kernel/debug/kdb/kdb_bt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ kdb_bt(int argc, const char **argv)
129129
}
130130
/* Now the inactive tasks */
131131
kdb_do_each_thread(g, p) {
132+
if (KDB_FLAG(CMD_INTERRUPT))
133+
return 0;
132134
if (task_curr(p))
133135
continue;
134136
if (kdb_bt1(p, mask, argcount, btaprompt))

kernel/debug/kdb/kdb_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,6 +2100,8 @@ static int kdb_dmesg(int argc, const char **argv)
21002100
}
21012101
if (!lines--)
21022102
break;
2103+
if (KDB_FLAG(CMD_INTERRUPT))
2104+
return 0;
21032105

21042106
kdb_printf("%.*s\n", (int)len - 1, buf);
21052107
}

0 commit comments

Comments
 (0)