NetBSD Problem Report #808
From gnats Sun Feb 19 21:30:11 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id VAA00279 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 19 Feb 1995 21:30:10 -0800
Message-Id: <199502200529.QAA19246@dodo.melb.cpr.itg.telecom.com.au>
Date: Mon, 20 Feb 1995 16:29:15 +1100
From: Luke Mewburn <lukem@dodo.melb.cpr.itg.telecom.com.au>
Reply-To: lm@melb.cpr.itg.telecom.com.au
To: gnats-bugs@NetBSD.ORG
Subject: tty defaults wrong for serial bootblocks
X-Send-Pr-Version: 3.2
>Number: 808
>Category: kern
>Synopsis: tty defaults (7E1) are wrong for i386 serial boot blocks
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: lm
>Arrival-Date: Sun Feb 19 21:35:01 +0000 1995
>Closed-Date: Sat Oct 26 11:46:48 +0000 1996
>Last-Modified: Sat Oct 26 11:47:10 +0000 1996
>Originator: Luke Mewburn
>Release: 1.0
>Organization:
" Werj"
>Environment:
System: NetBSD dodo 1.0 NetBSD 1.0 (DODO) #7: Fri Dec 16 17:01:27 EST 1994 simonb@dodo:/slab/0/src/sys/arch/i386/compile/DODO i386
>Description:
When using -DSERIAL on the i386 boot blocks, problems occur
when the kernel switches the com ports from the bootblocks
default of 9600 8N1 to 9600 7E1.
This causes the output of commands running in /etc/rc such as
fsck to output crud until you manage to change your terminal
emulation.
In essence, this is all due to an archaic default of 7E1,
instead of the more usable 8N1 (TTYDEF_CFLAG, defined in
sys/ttydefaults.h)
If this doesn't get changed for historical ("hysterical")
reasons, I think it's time to forget the past cause I hate
swapping terminal modes and my terminal is 8N1 for all other
other applications... ;)
>How-To-Repeat:
- Install i386 bootblocks compiled with -DSERIAL.
- Connect a terminal to com0, 9600, 8N1.
- Reboot, and watch the crud fly.
>Fix:
- Apply this patch to /sys/sys/ttydefaults.h.
- % cd /usr/src/include ; make install
- Rebuild the only things that directly use TTYDEF_CFLAG:
- kernel
- bin/stty
*** ttydefaults.h.orig Mon Feb 20 16:16:50 1995
--- ttydefaults.h Mon Feb 20 16:17:01 1995
***************
*** 52,58 ****
#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
#define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS)
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
! #define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
#define TTYDEF_SPEED (B9600)
/*
--- 52,58 ----
#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
#define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS)
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
! #define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
#define TTYDEF_SPEED (B9600)
/*
--
Luke Mewburn <lm@werj.com.au>
``This is the central trick of the censor: to exaggerate the importance of the
challenging speech, to suppress it, and to deny the suppression.''
-- 'Guilty Secrets; Free Speech & Defamation in Australia', Roger Pullan
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: lukem
State-Changed-When: Sat Oct 26 04:46:48 PDT 1996
State-Changed-Why:
mycroft did this in rev 1.9 of sys/ttydefaults.h
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.