Source-Changes-HG archive

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

[src/kqueue]: src/sys/kern so the one-off difference was caused by having fla...



details:   https://anonhg.NetBSD.org/src/rev/b92910b7cbf1
branches:  kqueue
changeset: 512517:b92910b7cbf1
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Sep 24 18:53:27 2002 +0000

description:
so the one-off difference was caused by having flags ONLCR and IGNCR
set for the master side of pty, so 'normal behaviour'

this also means the 'data' value returned for EVFILT_READ kevent(2)
is only approximation, but still useful as hint

diffstat:

 sys/kern/tty_pty.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 8eed629248c7 -r b92910b7cbf1 sys/kern/tty_pty.c
--- a/sys/kern/tty_pty.c        Tue Sep 24 11:50:17 2002 +0000
+++ b/sys/kern/tty_pty.c        Tue Sep 24 18:53:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty_pty.c,v 1.56.2.6 2002/09/24 10:45:23 jdolecek Exp $        */
+/*     $NetBSD: tty_pty.c,v 1.56.2.7 2002/09/24 18:53:27 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.56.2.6 2002/09/24 10:45:23 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.56.2.7 2002/09/24 18:53:27 jdolecek Exp $");
 
 #include "opt_compat_sunos.h"
 
@@ -742,8 +742,9 @@
 
        if (canread) {
                /*
-                * XXXLUKEM - the below c_cc value is one more than
-                * the actual amount of data in tty queue - why?
+                * c_cc is number of characters after output post-processing;
+                * the amount of data actually read(2) depends on 
+                * setting of input flags for the terminal.
                 */
                kn->kn_data = tp->t_outq.c_cc;
                if (((pti->pt_flags & PF_PKT) && pti->pt_send) ||



Home | Main Index | Thread Index | Old Index