Module Name:    src
Committed By:   christos
Date:           Sun Oct 18 15:14:50 UTC 2015

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

Log Message:
handle the hardware layer tty ioctls directly so that we don't need to load
the compat module for normal operations.


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 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.267 src/sys/kern/tty.c:1.268
--- src/sys/kern/tty.c:1.267	Tue Aug 25 08:55:30 2015
+++ src/sys/kern/tty.c	Sun Oct 18 11:14:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.267 2015/08/25 12:55:30 gson Exp $	*/
+/*	$NetBSD: tty.c,v 1.268 2015/10/18 15:14:50 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.267 2015/08/25 12:55:30 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.268 2015/10/18 15:14:50 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1370,7 +1370,22 @@ ttioctl(struct tty *tp, u_long cmd, void
 		    s != tp->t_qsize)
 			error = tty_set_qsize(tp, s);
 		return error;
+
+	case TIOCSBRK:
+	case TIOCCBRK:
+	case TIOCSDTR:
+	case TIOCCDTR:
+	case TIOCSFLAGS:
+	case TIOCGFLAGS:
+	case TIOCMSET:
+	case TIOCMGET:
+	case TIOCMBIS:
+	case TIOCMBIC:
+		/* Handled by the driver layer */
+		return EPASSTHROUGH;
+
 	default:
+		printf("BARF 0x%lx\n", cmd);
 #ifdef COMPAT_60
 		error = compat_60_ttioctl(tp, cmd, data, flag, l);
 		if (error != EPASSTHROUGH)

Reply via email to