From rhh@ipass.net Sun Jun 27 16:11:16 1999
Return-Path: <rhh@ipass.net>
Received: from pluto.ipass.net (pluto.ipass.net [198.79.53.5])
	by hub.freebsd.org (Postfix) with ESMTP id 81BF61517B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 27 Jun 1999 16:11:14 -0700 (PDT)
	(envelope-from rhh@ipass.net)
Received: from stealth.ipass.net. (ppp-1-79.dialup.rdu.ipass.net [209.170.132.79])
	by pluto.ipass.net (8.9.3/8.9.3) with ESMTP id TAA25570;
	Sun, 27 Jun 1999 19:11:10 -0400 (EDT)
Received: (from rhh@localhost)
	by stealth.ipass.net. (8.9.3/8.8.8) id TAA01194;
	Sun, 27 Jun 1999 19:13:00 -0400 (EDT)
	(envelope-from rhh)
Message-Id: <199906272313.TAA01194@stealth.ipass.net.>
Date: Sun, 27 Jun 1999 19:13:00 -0400 (EDT)
From: aa8vb@ipass.net
Sender: rhh@ipass.net
Reply-To: aa8vb@ipass.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: aa8vb@ipass.net
Subject: console fails to register tty size changes
X-Send-Pr-Version: 3.2

>Number:         12420
>Category:       kern
>Synopsis:       console fails to register tty size changes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 27 16:20:01 PDT 1999
>Closed-Date:    Tue Jul 6 06:15:35 PDT 1999
>Last-Modified:  Tue Jul  6 06:16:19 PDT 1999
>Originator:     Randall Hopper
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
self
>Environment:

        Stock 3.2-RELEASE.

>Description:

        The FreeBSD console does not pick up row/column size changes as
        3.0-RELEASE did when console mode changes are effected before
        login.  This causes full-screen applications like /usr/bin/more and
        less to fail to work correctly.

>How-To-Repeat:

        Insert these commands into rc.local and reboot (80x50 and other
        modes probably exhibit the same problem):

           vidcontrol < /dev/ttyv0 -f 8x8 cp866-8x8
           vidcontrol < /dev/ttyv0 132x43
           vidcontrol < /dev/ttyv1 132x43
           vidcontrol < /dev/ttyv2 132x43

        Then log into the console, and run:

           % stty size

        On 3.2-RELEASE, this results in the incorrect:

           25 80

        On 3.0-RELEASE, it gives the right answer:

           43 132

        Strangely, if you rexecute the vidcontrol mode set commands
        manually from the console prompt, then the the new window size is
        properly registered ("stty size" returns "43 132", and full-screen
        apps now work).

>Fix:

        Unknown.

>Release-Note:
>Audit-Trail:

From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
To: aa8vb@ipass.net
Cc: FreeBSD-gnats-submit@freebsd.org,
	yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject: Re: kern/12420: console fails to register tty size changes 
Date: Mon, 28 Jun 1999 21:33:36 +0900

 >>Number:         12420
 >>Category:       kern
 >>Synopsis:       console fails to register tty size changes
 [...]
 >>Arrival-Date:   Sun Jun 27 16:20:01 PDT 1999
 >>Closed-Date:
 >>Last-Modified:
 >>Originator:     Randall Hopper
 >>Release:        FreeBSD 3.2-RELEASE i386
 >>Organization:
 >self
 >>Environment:
 >
 >        Stock 3.2-RELEASE.
 >
 >>Description:
 >
 >        The FreeBSD console does not pick up row/column size changes as
 >        3.0-RELEASE did when console mode changes are effected before
 >        login.  This causes full-screen applications like /usr/bin/more and
 >        less to fail to work correctly.
 
 # Considering the nature of the bug, I would assume that the problem
 # existed for a long time and 3.0 did have the same problem...
 
 Anyway, please apply the following patch to /sys/dev/syscons/syscons.c
 and rebuild the kernel.
 
 Please report if it works.
 
 Kazu
 
 --- syscons.c-1.293.2.3	Tue May 11 12:30:41 1999
 +++ syscons.c	Mon Jun 28 21:29:06 1999
 @@ -684,6 +684,7 @@
  {
      struct tty *tp = scdevtotty(dev);
      keyarg_t key;
 +    int error;
  
      if (!tp)
  	return(ENXIO);
 @@ -711,6 +712,7 @@
      else
  	if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0)
  	    return(EBUSY);
 +    error = (*linesw[tp->t_line].l_open)(dev, tp);
      if (minor(dev) < MAXCONS && !console[minor(dev)]) {
  	console[minor(dev)] = alloc_scp();
  	if (ISGRAPHSC(console[minor(dev)]))
 @@ -720,7 +722,7 @@
  	tp->t_winsize.ws_col = console[minor(dev)]->xsize;
  	tp->t_winsize.ws_row = console[minor(dev)]->ysize;
      }
 -    return ((*linesw[tp->t_line].l_open)(dev, tp));
 +    return error;
  }
  
  int
 

From: Randall Hopper <aa8vb@ipass.net>
To: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/12420: console fails to register tty size changes
Date: Mon, 28 Jun 1999 17:00:52 -0400

 Kazutaka YOKOTA:
  |
  |>>Number:         12420
  |>>Category:       kern
  |>>Release:        FreeBSD 3.2-RELEASE i386
  |>>Description:
  |>        The FreeBSD console does not pick up row/column size changes as
  |>        3.0-RELEASE did when console mode changes are effected before
  |>        login.  This causes full-screen applications like /usr/bin/more and
  |>        less to fail to work correctly.
  |
  |# Considering the nature of the bug, I would assume that the problem
  |# existed for a long time and 3.0 did have the same problem...
  |
  |Anyway, please apply the following patch to /sys/dev/syscons/syscons.c
  |and rebuild the kernel.
  |
  |Please report if it works.
 
 Works great.  Thank you!
 
 Randall
 
State-Changed-From-To: open->closed 
State-Changed-By: yokota 
State-Changed-When: Tue Jul 6 06:15:35 PDT 1999 
State-Changed-Why:  
Fixed in syscons.c rev 1.310 in -CURRENT and in rev 1.293.2.4 in -STABLE. 
>Unformatted:
