*BSD News Article 20837


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!library.ucla.edu!network.ucsd.edu!news.cerf.net!crash!fredbox!cyb!loodvrij
From: loodvrij@cyb.fred.com (Bruce 'Loodvrij' Keeler)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: com driver problems in NetBSD 0.9
Message-ID: <CD7oov.2nI@cyb.fred.com>
Date: Sat, 11 Sep 1993 22:48:17 GMT
References: <1993Sep5.184053.5872@newstand.syr.edu> <cproto.747585384@marsh> <cproto.747589511@marsh> <26pfqk$36r@netbsd08.dn.itg.telecom.com.au>
Organization: Cacophonous Yodellers' BBS (907) 338-4942 7-E-1
Lines: 59

In article <26pfqk$36r@netbsd08.dn.itg.telecom.com.au> tdwyer@netbsd08.dn.itg.telecom.com.au (Terry Dwyer netbsd08 619 491 5161) writes:
>Computer Protocol (cproto@cs.curtin.edu.au) wrote:
>
>: The settings are _almost_ reasonable but I just noticed that
>: the setting becomes "a bit strange". After login the setting
>                                       ^^^^^^^^^^^^^^^^^^^^^^^
>: is 8N1. Once I start VI/ELVIS it becomes 7N1. My first terminal
>  ^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Exactly my point - vi, more, and I think less all fiddle with the 
>stty and when you exit, the settings are 7E1 when your terminal is
>8N1.  I think, from memory (quite some time ago), that more garbled
>the stty as soon as you ran it, I may be wrong.  Have a look on minnie
>and grab the archives for c.o.3.* for the last two months or so.  The 
>discussion became fairly technical and I among many others probably
>skimmed without really understanding what the details were.  I seem to
>remember there was some talk of hacking the tty driver to provide an
>8 bit clean environment.  I don't know how far this has gone.

I started a discussion on this about 2 weeks ago.  The problem is in
tty_compat.c, which deals with translating sgtty TIOC[SG]ETP ioctls into
termios stuff.  Basically, when you do s GETP, the PASS8 flag is not
set correctly (from what I can make out).  So when the process does the SETP
it slips into cs7/parenb mode.  

I originally complained about this in <CC8J0o.7o@cyb.fred.com>, and posted
a patch in a followup <CCCIwt.AI@cyb.fred.com>.  Once again though, I am
*NOT* a guru, so use at your own discretion.

One more thing; Pierre Beyssac (Pierre.Beyssac@emeraude.syseca.fr) has been
having similar (albeit different) problems with the tty_compat.c in NetBSD0.9
which has apparently changed.  He sent me his fix to it, though I've not
had chance to test it yet.

Bruce

--------------------------------------
*** tty_compat.c.old    Mon Aug 23 15:42:18 1993
--- tty_compat.c    Mon Aug 23 15:44:50 1993
***************
*** 245,251 ****
    } else {
        if ((tp->t_flags&LITOUT) && !(oflag&OPOST))
            flags |= LITOUT;
!       if (tp->t_flags&PASS8)
            flags |= PASS8;
    }
    
--- 245,251 ----
    } else {
        if ((tp->t_flags&LITOUT) && !(oflag&OPOST))
            flags |= LITOUT;
!       if (tp->t_flags&PASS8 || cflag&CS8)
            flags |= PASS8;
    }
----------------------------------------
-- 
Bruce J. Keeler (907) 337-8193              | "...and Bruce is in charge    |
Internet: loodvrij@cyb.fred.com             |        of the sheep dip!"     |