From owner-freebsd-current Wed Apr 24 07:08:55 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA16771 for current-outgoing; Wed, 24 Apr 1996 07:08:55 -0700 (PDT) Received: from ra.dkuug.dk (ra.dkuug.dk [193.88.44.193]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA16749 Wed, 24 Apr 1996 07:08:36 -0700 (PDT) Received: (from sos@localhost) by ra.dkuug.dk (8.6.12/8.6.12) id PAA08249; Wed, 24 Apr 1996 15:59:45 +0200 Message-Id: <199604241359.PAA08249@ra.dkuug.dk> Subject: Re: minor syscons bogon To: fty@mcnc.org (Frank E. Terhaar-Yonkers) Date: Wed, 24 Apr 1996 15:59:44 +0200 (MET DST) Cc: current@FreeBSD.ORG, freebsd-current@FreeBSD.ORG In-Reply-To: <199604241340.JAA14983@robin.mcnc.org.mcnc.org> from "Frank E. Terhaar-Yonkers" at Apr 24, 96 09:40:52 am From: sos@FreeBSD.ORG Reply-to: sos@FreeBSD.ORG X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In reply to Frank E. Terhaar-Yonkers who wrote: > > I posted recently that I was having trouble with console lockups while > running X. This problem was a combination of "I'm a stupid" and a minor > bug in syscons.c. > > I'd recompiled my kernel with MAXCONS set to to 4, to save a few bytes of > memory and left xdm getty'd to ttyv4 - duh. Only, the bloody thing > ran - for a while, until it had tiptoed thru enuf memory ... There is no real saving in mucking with MAXCONS, all vty's are dynamically allocated... Besides MAXCONS are to meant to be fooled around with, its a value used as a max value... > Would someone kindly commit this patch so others don't fall in the same > hole? I believe pcvt has the same bug, but haven't looked at it. NO, this breaks the console device /dev/console ! (and its not a bug) > - Frank > > *** syscons.c.orig Thu Feb 8 04:25:44 1996 > --- syscons.c Wed Apr 24 05:31:05 1996 > *************** > *** 305,311 **** > > if (!init_done) > return(NULL); > ! if (unit > MAXCONS || unit < 0) > return(NULL); > if (unit == MAXCONS) > return CONSOLE_TTY; > --- 305,311 ---- > > if (!init_done) > return(NULL); > ! if (unit >= MAXCONS || unit < 0) > return(NULL); > if (unit == MAXCONS) > return CONSOLE_TTY; > > \\\\////\\\\////\\\\\////\\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\ > Frank Terhaar-Yonkers, Manager > High Performance Computing and Communications Research > MCNC > PO Box 12889 3021 Cornwallis Road > Research Triangle Park, North Carolina 27709-2889 > fty@mcnc.org voice (919)248-1417 FAX (919)248-1455 > > http://www.mcnc.org/hpcc.html > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Soren Schmidt (sos@FreeBSD.org) FreeBSD Core Team So much code to hack -- so little time.