Module Name: src
Committed By: dyoung
Date: Tue Nov 16 23:58:12 UTC 2010
Modified Files:
src/sys/kern: tty_pty.c
Log Message:
Fix a bug in ptcread() that stopped a pty(4) in TIOCPKT_IOCTL mode from
sending a termios(4) structure like it was supposed to: ptcread() used
to copy pti->pt_send and zero it before testing it for TIOCPKT_IOCTL.
Test for TIOCPKT_IOCTL in the pti->pt_send copy in local variable c
instead of in pti->pt_send itself.
To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/kern/tty_pty.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_pty.c
diff -u src/sys/kern/tty_pty.c:1.123 src/sys/kern/tty_pty.c:1.124
--- src/sys/kern/tty_pty.c:1.123 Sun Sep 5 18:03:37 2010
+++ src/sys/kern/tty_pty.c Tue Nov 16 23:58:11 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tty_pty.c,v 1.123 2010/09/05 18:03:37 dyoung Exp $ */
+/* $NetBSD: tty_pty.c,v 1.124 2010/11/16 23:58:11 dyoung Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.123 2010/09/05 18:03:37 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.124 2010/11/16 23:58:11 dyoung Exp $");
#include "opt_ptm.h"
@@ -615,7 +615,7 @@
* relevant only if the tty got closed and then
* opened again while we were out uiomoving.
*/
- if (pti->pt_send & TIOCPKT_IOCTL) {
+ if (c & TIOCPKT_IOCTL) {
cc = min(uio->uio_resid,
sizeof(tp->t_termios));
uiomove((void *) &tp->t_termios,