From owner-freebsd-current Thu Apr 25 06:03:18 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA07798 for current-outgoing; Thu, 25 Apr 1996 06:03:18 -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 GAA07792 Thu, 25 Apr 1996 06:03:16 -0700 (PDT) Received: by robin.mcnc.org.mcnc.org (8.6.9/MCNC/8-10-92) id JAA09174; Thu, 25 Apr 1996 09:03:15 -0400 for Date: Thu, 25 Apr 1996 09:03:15 -0400 From: "Frank E. Terhaar-Yonkers" Message-Id: <199604251303.JAA09174@robin.mcnc.org.mcnc.org> To: sos@FreeBSD.org Subject: Re: minor syscons bogon Cc: bde@zeta.org.au, 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 >> Does anything actually use this kludge? Like, how would an application >> even know that /dev/ttyv[MAXCONS] == /dev/console ? This is very ugly. > Obviously. >NO vty is the same as /dev/console, period. But by changing the MAXCONS >define you break the logic in syscons that deals with this. Exactly my point. Tying a kernel define to a minor device # is stupid. >NO application is supposed to know ANYTHING about MAXCONS, its an internal >define to syscons, and it shouldn't be tampered with (except you know Then document it as such. >EXACTLY what you are doing). It is a hack that solves an old problem >in the way interaction with the console is done internally in the kernel. >There was a time when it defined the number of consoles available, but >that is long gone, as that is done dynamically now. >It has nothing to do with the physical /dev/console device which is >alwas on the same major/minor no matter what MAXCONS is set to. >So don't change MAXCONS, and don't make more than the 16 vty's >that MAKEDEV allows you to, or something VERY UGLY is going to happen. It's not unreasonable to whittle down defines to say, get a kernel (and enuf utils) to fit on a 1.44 floppy for "fixit" purposes. This define seemed to fit the bill. A "few bytes" here and there makes a huge difference not only here but in a production system where it may make the difference between a process page thrashing or not. >I wouldn't advise that you go change random defines all over the >place or you are in for some REAL trouble. > > >-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- >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