Module Name:    src
Committed By:   christos
Date:           Thu Oct 22 17:36:33 UTC 2015

Modified Files:
        src/sys/kern: tty.c

Log Message:
Add console-related ioctls.


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/sys/kern/tty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/tty.c
diff -u src/sys/kern/tty.c:1.269 src/sys/kern/tty.c:1.270
--- src/sys/kern/tty.c:1.269	Sun Oct 18 11:58:23 2015
+++ src/sys/kern/tty.c	Thu Oct 22 13:36:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.269 2015/10/18 15:58:23 christos Exp $	*/
+/*	$NetBSD: tty.c,v 1.270 2015/10/22 17:36:33 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.269 2015/10/18 15:58:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.270 2015/10/22 17:36:33 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1395,6 +1395,17 @@ ttioctl(struct tty *tp, u_long cmd, void
 		return EPASSTHROUGH;
 
 	default:
+		/* Pass through various console ioctls */
+		switch (IOCGROUP(cmd)) {
+		case 'c':	/* syscons console */
+		case 'v':	/* usl console, video - where one letter */
+		case 'K':	/* usl console, keyboard - aint enough */
+		case 'V':	/* pcvt compat */
+		case 'W':	/* wscons console */
+			return EPASSTHROUGH;
+		default:
+			break;
+		}
 #ifdef COMPAT_60
 		error = compat_60_ttioctl(tp, cmd, data, flag, l);
 		if (error != EPASSTHROUGH)

Reply via email to