From 5fddef79998678d256ba30316353393b4d8ebb32 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 12 Jan 2017 00:22:36 +0000 Subject: [PATCH] Enable the use of ^C and ^S/^Q in DDB. This lets one interrupt DDB's output, which is useful if paging is disabled and the output device is slow. Submitted by: Anton Rang Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9138 --- sys/ddb/db_input.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c index a2a7b3829e8..f40ee755eca 100644 --- a/sys/ddb/db_input.c +++ b/sys/ddb/db_input.c @@ -63,7 +63,6 @@ static int db_lhist_nlines; #define BLANK ' ' #define BACKUP '\b' -static int cnmaygetc(void); static void db_delete(int n, int bwd); static int db_inputchar(int c); static void db_putnchars(int c, int count); @@ -291,12 +290,6 @@ db_inputchar(c) return (0); } -static int -cnmaygetc() -{ - return (-1); -} - int db_readline(lstart, lsize) char * lstart; @@ -350,7 +343,7 @@ db_check_interrupt(void) { int c; - c = cnmaygetc(); + c = cncheckc(); switch (c) { case -1: /* no character */ return; @@ -361,7 +354,7 @@ db_check_interrupt(void) case CTRL('s'): do { - c = cnmaygetc(); + c = cncheckc(); if (c == CTRL('c')) db_error((char *)0); } while (c != CTRL('q'));