]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
kdb: Fix dmesg/bta scroll to quit with 'q'
authorJason Wessel <jason.wessel@windriver.com>
Mon, 27 Aug 2012 02:43:12 +0000 (21:43 -0500)
committerJason Wessel <jason.wessel@windriver.com>
Fri, 12 Oct 2012 11:37:35 +0000 (06:37 -0500)
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>
kernel/debug/kdb/kdb_bt.c
kernel/debug/kdb/kdb_main.c

index 07c9bbb94a0b3016e9b0d0d11d5c4f6a94cd1658..b03e0e814e43b9f05f598f14f5f9a06618f3f21a 100644 (file)
@@ -129,6 +129,8 @@ kdb_bt(int argc, const char **argv)
                }
                /* Now the inactive tasks */
                kdb_do_each_thread(g, p) {
+                       if (KDB_FLAG(CMD_INTERRUPT))
+                               return 0;
                        if (task_curr(p))
                                continue;
                        if (kdb_bt1(p, mask, argcount, btaprompt))
index 31df1706b9a9344bf3d63a1b0146987378060ed4..1afeb5c1e5a92e81d8b60599448cab871ed67698 100644 (file)
@@ -2100,6 +2100,8 @@ static int kdb_dmesg(int argc, const char **argv)
                }
                if (!lines--)
                        break;
+               if (KDB_FLAG(CMD_INTERRUPT))
+                       return 0;
 
                kdb_printf("%.*s\n", (int)len - 1, buf);
        }