Module Name:    src
Committed By:   njoly
Date:           Fri Dec 27 16:58:50 UTC 2013

Modified Files:
        src/sys/compat/linux/common: linux_termios.c

Log Message:
Add easy parts (TCOOFF/TCOON) of the TCXONC linux termios ioctl.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/compat/linux/common/linux_termios.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/compat/linux/common/linux_termios.c
diff -u src/sys/compat/linux/common/linux_termios.c:1.36 src/sys/compat/linux/common/linux_termios.c:1.37
--- src/sys/compat/linux/common/linux_termios.c:1.36	Fri Jul  4 10:13:52 2008
+++ src/sys/compat/linux/common/linux_termios.c	Fri Dec 27 16:58:50 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_termios.c,v 1.36 2008/07/04 10:13:52 matthias Exp $	*/
+/*	$NetBSD: linux_termios.c,v 1.37 2013/12/27 16:58:50 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.36 2008/07/04 10:13:52 matthias Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.37 2013/12/27 16:58:50 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ptm.h"
@@ -348,6 +348,22 @@ linux_ioctl_termios(struct lwp *l, const
 			DPRINTF(("TIOCSPTLCK %d\n", idat));
 			return 0;
 #endif
+	case LINUX_TCXONC:
+		idat = (u_long)SCARG(uap, data);
+		switch (idat) {
+		case LINUX_TCOOFF:
+			SCARG(&ia, com) = TIOCSTOP;
+			break;
+		case LINUX_TCOON:
+			SCARG(&ia, com) = TIOCSTART;
+			break;
+		case LINUX_TCIOFF:
+		case LINUX_TCION:
+		default:
+			error = EINVAL;
+			goto out;
+		}
+		break;
 	default:
 		error = EINVAL;
 		goto out;

Reply via email to