summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_cons.c
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/kern/tty_cons.c
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/kern/tty_cons.c')
-rw-r--r--sys/kern/tty_cons.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 38a0898..26d6874 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
- * $Id: cons.c,v 1.47 1996/09/14 04:25:32 bde Exp $
+ * $Id: cons.c,v 1.48 1996/10/16 00:19:38 julian Exp $
*/
#include <sys/param.h>
@@ -90,7 +90,7 @@ static dev_t cn_dev_t;
SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLTYPE_OPAQUE|CTLFLAG_RD,
&cn_dev_t, sizeof cn_dev_t, "T,dev_t", "");
static int cn_mute;
-SYSCTL_INT(_kern, KERN_CONSMUTE, consmute, CTLFLAG_RW, &cn_mute, 0, "");
+SYSCTL_INT(_kern, OID_AUTO, consmute, CTLFLAG_RW, &cn_mute, 0, "");
int cons_unavail = 0; /* XXX:
* physical console not available for
@@ -302,7 +302,7 @@ cngetc()
{
int c;
if ((cn_tab == NULL) || cn_mute)
- return (0);
+ return (-1);
c = (*cn_tab->cn_getc)(cn_tab->cn_dev);
if (c == '\r') c = '\n'; /* console input is always ICRNL */
return (c);
OpenPOWER on IntegriCloud