Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 1997 12:16:15 -0600 (CST)
From:      Jim Bryant <jbryant@unix.tfs.net>
To:        yokota@zodiac.mech.utsunomiya-u.ac.jp (Kazutaka YOKOTA)
Cc:        freebsd-current@freebsd.org
Subject:   Re: sc0 scrollback flaw
Message-ID:  <199712071816.MAA01529@unix.tfs.net>
In-Reply-To: <199712071051.TAA15489@zodiac.mech.utsunomiya-u.ac.jp> from Kazutaka YOKOTA at "Dec 7, 97 07:50:59 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply:
> >> >i'm still running the Dec. 2 version of -current, but will be
> >> >cvsupping the latest in a few minutes...  i can take a look at
> >> >syscons.c, and see if i can find where this is happening...
> >> 
> >> I did add SC_HISTORY_SIZE stuff to syscons.c. But, I never touched
> >> screen clearing part of the code, because SC_HISTORY_SIZE affects the
> >> driver only when the history buffer is allocated, which happens a) if
> >> the virtual console is opened for the first time, b) if the user runs
> >> `kbdcontrol -h lines' to set the history buffer size, c) or if the
> >> screen size is changed by `vidcontrol VGA_xxx'.
> >> 
> >> I'm puzzled.
> >
> >hmmm...  just remembering, i do change the screen dimensions to 80x60,
> >but that is beside the point, as even asfter the switch, i still
> >retained the kernel boot messages before, and now everything prior to
> >login now is lost...
> >
> >my .login is enclosed...  btw: i guess i don't do a clear, and the
> >mode change does it..  note that clear is commented...  sorry...
> 
> Before the introduction of SC_HISTORY_SIZE, syscons didn't check if
> the history buffer size is sufficient for the new screen size when the
> user is changing the screen size. If you set HISTORY_SIZE to a small
> number, say 40 lines, and changed the screen size to 80x60, the system
> would crash.
> 
> So, syscons was to made to free the history buffer whenever the screen
> size is changed and allocate a new buffer.
> 
> Ok, probably we should retain the history buffer contents if possible,
> when the screen size is changed and when the history buffer size is
> changed.

maybe do a compare against SC_HISTORY_SIZE with the current and
desired screen size when changing it?  truncate if 
SC_HISTORY_SIZE < desired.

the way it was before, it only allocated a set number of char cells,
do you do it by the line now?

jim
-- 
All opinions expressed are mine, if you    |  "I will not be pushed, stamped,
think otherwise, then go jump into turbid  |  briefed, debriefed, indexed, or
radioactive waters and yell WAHOO !!!      |  numbered!" - #1, "The Prisoner"
------------------------------------------------------------------------------
Inet: jbryant@tfs.net    AX.25: kc5vdj@wv0t.#neks.ks.usa.noam     grid: EM28pw
voice: KC5VDJ - 6 & 2 Meters AM/FM/SSB, 70cm FM.   http://www.tfs.net/~jbryant
------------------------------------------------------------------------------
HF/6M/2M: IC-706-MkII, 2M: HTX-212, 2M: HTX-202, 70cm: HTX-404, Packet: KPC-3+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712071816.MAA01529>