Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern handle the hardware layer tty ioctls directly so th...



details:   https://anonhg.NetBSD.org/src/rev/c4afe79b6b58
branches:  trunk
changeset: 811249:c4afe79b6b58
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 18 15:14:50 2015 +0000

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

diffstat:

 sys/kern/tty.c |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 85197864099f -r c4afe79b6b58 sys/kern/tty.c
--- a/sys/kern/tty.c    Sun Oct 18 14:49:24 2015 +0000
+++ b/sys/kern/tty.c    Sun Oct 18 15:14:50 2015 +0000
@@ -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 @@
                    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)



Home | Main Index | Thread Index | Old Index