NetBSD Problem Report #400
From gnats Sun Aug 7 14:32:03 1994
Received: from bloom-beacon.mit.edu (BLOOM-BEACON.MIT.EDU [18.181.0.26]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id OAA28388 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 7 Aug 1994 14:32:02 -0700
Message-Id: <199408072117.RAA01517@orchard.medford.ma.us>
Date: Sun, 7 Aug 1994 17:17:31 -0400
From: sommerfeld@orchard.medford.ma.us
Reply-To: sommerfeld@orchard.medford.ma.us
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: pcvt sometimes gets confused about window size+FIX
X-Send-Pr-Version: 3.2
>Number: 400
>Category: port-i386
>Synopsis: pcvt sometimes gets confused about window size
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Aug 07 14:35:09 +0000 1994
>Closed-Date: Tue Oct 17 02:44:20 +0000 1995
>Last-Modified: Tue Oct 17 06:45:12 +0000 1995
>Originator: Bill Sommerfeld
>Release: 1.0BETA
>Organization:
" "
>Environment:
System: NetBSD orchard.medford.ma.us 1.0_BETA NetBSD 1.0_BETA (ORCHARD) #6: Sun Aug 7 13:54:11 EDT 1994 sommerfeld@orchard.medford.ma.us:/u1/nsys/sys/arch/i386/compile/ORCHARD i386
>Description:
PCVT should never get confused about the screen size, but when
starting up a new session, the system reports a screen size of 0,0.
Given that it *knows* how big the screen is, this struck me as odd,
so I hacked together the following patches.
The net effect of this is:
- when opening the device, the x,y size of the terminal
matches the current display mode.
- TIOCSWSZ is ignored by the driver (as it knows better..).
Note the kludge to work around the line discipline's
zeroing of the window size..
>How-To-Repeat:
>Fix:
*** /u1/nsup/src/sys/arch/i386/isa/pcvt/pcvt_drv.c Thu May 5 07:11:52 1994
--- pcvt_drv.c Wed Jul 6 18:13:05 1994
***************
*** 327,333 ****
register struct tty *tp;
register struct video_state *vsx;
int i = minor(dev);
!
#if PCVT_EMU_MOUSE
if(i == totalscreens)
vsx = 0;
--- 327,333 ----
register struct tty *tp;
register struct video_state *vsx;
int i = minor(dev);
! int s;
#if PCVT_EMU_MOUSE
if(i == totalscreens)
vsx = 0;
***************
*** 374,379 ****
--- 374,402 ----
tp->t_state |= TS_CARR_ON;
tp->t_cflag |= CLOCAL; /* cannot be a modem (:-) */
+
+ /* we do this here because line discipline clobbers t_winsize
+ if TS_ISOPEN is clear.. and that's all it does which checks
+ TS_ISOPEN..
+ */
+ s = spltty();
+ #define SET(t, f) (t) |= (f)
+ #define ISSET(t, f) ((t) & (f))
+
+ if (!ISSET(tp->t_state, TS_ISOPEN)) {
+ SET(tp->t_state, TS_ISOPEN); /* !!! */
+ #if 0
+ printf("pc%d: size %dx%d\n", dev, vsx->maxcol,
+ vsx->screen_rows);
+ #endif
+ tp->t_winsize.ws_col = vsx->maxcol;
+ tp->t_winsize.ws_row = vsx->screen_rows;
+ tp->t_winsize.ws_xpixel = (vsx->maxcol == 80)? 720: 1056;
+ tp->t_winsize.ws_ypixel = 400;
+ }
+ #undef SET
+ #undef ISSET
+ splx(s);
#if PCVT_NETBSD
return ((*linesw[tp->t_line].l_open)(dev, tp));
*** /u1/nsup/src/sys/arch/i386/isa/pcvt/pcvt_sup.c Fri May 6 06:14:43 1994
--- pcvt_sup.c Wed Jul 6 18:13:08 1994
***************
*** 264,269 ****
--- 264,272 ----
else
return EINVAL;
break;
+ case TIOCSWINSZ:
+ /* do nothing here */
+ break;
default:
return -1;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended
State-Changed-By: jtc
State-Changed-When: Thu Dec 22 10:06:33 1994
State-Changed-Why:
PR forwarded to Hellmuth, who responded:
Applied to current pcvt 3.20 development tree.
PR suspended until pcvt 3.20 is released.
State-Changed-From-To: suspended->closed
State-Changed-By: jtc
State-Changed-When: Tue Oct 17 02:44:20 1995
State-Changed-Why:
We've integrated pcvt 3.32, which addresses this issue (in a slightly
different manner).
>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.