*BSD News Article 19932


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!network.ucsd.edu!news.cerf.net!crash!fredbox!cyb!loodvrij
From: loodvrij@cyb.fred.com (Bruce 'Loodvrij' Keeler)
Newsgroups: comp.os.386bsd.bugs
Subject: sgtty stuff (NetBSD 0.8)
Message-ID: <CC8J0o.7o@cyb.fred.com>
Date: Mon, 23 Aug 1993 23:09:45 GMT
Organization: Cacophonous Yodellers' BBS (907) 338-4942 7-E-1
Lines: 34

I've been further working on the parity problem I moaned about a few weeks
ago (getting the damn thing to use N81 instead of [EO]71).

It certainly seems that there is a bug somewhere in the sgtty stuff.  It
appears that whenever you do TIOCSETP it resets the parity to E71.  The
following code illustrates the problem:

----------------------
#include <stdio.h>
#include <sgtty.h>

main () {
	struct sgttyb fred;

	if (ioctl(0, TIOCGETP, &fred) == -1)
	{
		perror("ioctl1");
		exit(1);
	}
	if (ioctl(0, TIOCSETP, &fred) == -1)
	{
		perror("ioctl2");
		exit(1);
	}
}
-----------------------
If you run this code on a terminal in N81 mode, it ends up set to E71.

If someone has already fixed this, could you send a patch?  Thanks.

Bruce
-- 
Bruce J. Keeler (907) 337-8193              | "...and Bruce is in charge    |
Internet: loodvrij@cyb.fred.com             |        of the sheep dip!"     |