summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-12-30 18:11:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-12-30 18:11:26 +0000
commit5a5e42585277e6f9ae298508b0289638b926af16 (patch)
treedf35c42ec69d6a32aa09f1ef2c91b9b837623f67
parente47e173ae725a59836c069d6de4a6d56b1f8acb7 (diff)
Stop TIOCCONS from silently doing nothing if the console device has CN_REMOTE
priority; this might have been bright 12 years ago, but this is wrong (and does not rely upon any decent semantic). agreed krw@
-rw-r--r--sys/dev/cons.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/cons.c b/sys/dev/cons.c
index acd5ffd5909..0d2125d4453 100644
--- a/sys/dev/cons.c
+++ b/sys/dev/cons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cons.c,v 1.14 2003/09/23 16:51:12 millert Exp $ */
+/* $OpenBSD: cons.c,v 1.15 2005/12/30 18:11:25 miod Exp $ */
/* $NetBSD: cons.c,v 1.30 1996/04/08 19:57:30 jonathan Exp $ */
/*
@@ -127,7 +127,7 @@ cnread(dev, uio, flag)
* input (except a shell in single-user mode, but then,
* one wouldn't TIOCCONS then).
*/
- if (constty != NULL && (cn_tab == NULL || cn_tab->cn_pri != CN_REMOTE))
+ if (constty != NULL)
return 0;
else if (cn_tab == NULL)
return ENXIO;
@@ -147,7 +147,7 @@ cnwrite(dev, uio, flag)
* Redirect output, if that's appropriate.
* If there's no real console, return ENXIO.
*/
- if (constty != NULL && (cn_tab == NULL || cn_tab->cn_pri != CN_REMOTE))
+ if (constty != NULL)
dev = constty->t_dev;
else if (cn_tab == NULL)
return ENXIO;
@@ -192,7 +192,7 @@ cnioctl(dev, cmd, data, flag, p)
* ioctls on /dev/console, then the console is redirected
* out from under it.
*/
- if (constty != NULL && (cn_tab == NULL || cn_tab->cn_pri != CN_REMOTE))
+ if (constty != NULL)
dev = constty->t_dev;
else if (cn_tab == NULL)
return ENXIO;
@@ -214,7 +214,7 @@ cnpoll(dev, rw, p)
* I don't want to think of the possible side effects
* of console redirection here.
*/
- if (constty != NULL && (cn_tab == NULL || cn_tab->cn_pri != CN_REMOTE))
+ if (constty != NULL)
dev = constty->t_dev;
else if (cn_tab == NULL)
return ENXIO;
@@ -234,7 +234,7 @@ cnkqfilter(dev, kn)
* Redirect output, if that's appropriate.
* If there's no real console, return 1.
*/
- if (constty != NULL && (cn_tab == NULL || cn_tab->cn_pri != CN_REMOTE))
+ if (constty != NULL)
dev = constty->t_dev;
else if (cn_tab == NULL)
return (1);