From owner-freebsd-current Wed Apr 24 07:59:03 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA23045 for current-outgoing; Wed, 24 Apr 1996 07:59:03 -0700 (PDT) Received: from robin.mcnc.org.mcnc.org (robin.mcnc.org [128.109.130.29]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA23038 Wed, 24 Apr 1996 07:58:58 -0700 (PDT) Received: by robin.mcnc.org.mcnc.org (8.6.9/MCNC/8-10-92) id KAA20962; Wed, 24 Apr 1996 10:58:58 -0400 for Date: Wed, 24 Apr 1996 10:58:58 -0400 From: "Frank E. Terhaar-Yonkers" Message-Id: <199604241458.KAA20962@robin.mcnc.org.mcnc.org> To: sos@FreeBSD.ORG Subject: Re: minor syscons bogon Cc: current@FreeBSD.ORG, freebsd-current@FreeBSD.ORG X-Face: ,fjtWiMPydUaSQl%8[eTg`u:^BXt&T)Sny(6w\*U"5D9H[Z$kG%Q/z;Z=NwrPiXf-aMF3R) Rsand$,]26-8>5@HD(A3A79gN|0%NHsdek4mT8E,>j+\w!~d2#nH;~NV!5a0"`5$Cj8d\or(Jy/JQ_ |uc;C[filmZ(~#lre*l:|O%d/PJFy`.5w8)sMZ-)QI3TaV"j'k Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk That's fine .. >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) The fix may not be correct if it does in fact break /dev/console. But the scenario IS A BUG. The kernel should not allow an open/write to an unconfigured device with obviously bad results. > >> - 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. > \\\\////\\\\////\\\\\////\\\\\////\\\\////\\\\////\\\\////\\\\////\\\\////\\\\ 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