summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1996-10-30 21:40:25 +0000
committerjulian <julian@FreeBSD.org>1996-10-30 21:40:25 +0000
commite1b78916a4b8d96475ebaa0033860c706702fe49 (patch)
tree7f91e449007a1047faa2d9f2c7a89b4278636efe /sys/ddb
parentaafdab57f3e07a14467e840e7ba559b810eaef68 (diff)
downloadFreeBSD-src-e1b78916a4b8d96475ebaa0033860c706702fe49.zip
FreeBSD-src-e1b78916a4b8d96475ebaa0033860c706702fe49.tar.gz
if there is no console, cngetc should act like getc and return -1
make callers aware of this in those cases where it can occur.
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_input.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c
index 5e737ca..0b009e9 100644
--- a/sys/ddb/db_input.c
+++ b/sys/ddb/db_input.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_input.c,v 1.13 1996/05/08 04:28:34 gpalmer Exp $
+ * $Id: db_input.c,v 1.14 1996/08/10 13:38:44 joerg Exp $
*/
/*
@@ -219,6 +219,13 @@ db_inputchar(c)
db_lc = db_le;
goto redraw;
+ case -1:
+ /*
+ * eek! the console returned eof.
+ * probably that means we HAVE no console.. we should try bail
+ * XXX
+ */
+ c = '\r';
case '\n':
case '\r':
*db_le++ = c;
OpenPOWER on IntegriCloud