From owner-freebsd-current Fri Sep 27 8:35:49 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A30E37B401 for ; Fri, 27 Sep 2002 08:35:47 -0700 (PDT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D1F443E42 for ; Fri, 27 Sep 2002 08:35:47 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 22547 invoked from network); 27 Sep 2002 15:35:46 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 27 Sep 2002 15:35:46 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g8RFZjBv095309; Fri, 27 Sep 2002 11:35:45 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020927.011111.127772150.imp@bsdimp.com> Date: Fri, 27 Sep 2002 11:35:47 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Subject: Re: ttys patch - any objections? Cc: mark@grondar.za, current@FreeBSD.ORG, gallatin@cs.duke.edu Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 27-Sep-2002 M. Warner Losh wrote: > In message: > John Baldwin writes: >: >: On 26-Sep-2002 Andrew Gallatin wrote: >: > >: > Mark Murray writes: >: > > Hi >: > > >: > > The attached patch gets done by me any time I set up a FreeBSD >: > > box (I like lots of VTYs and X on ALT-F12). >: > > >: > > Any objections to my committing this? >: > >: > I object. >: > >: > Most of my machines are headless without video cards and use a serial >: > console. With devfs this means that /dev/ttyv[1-N] do not exist and >: > getty bitches like this: >: > >: > Sep 26 11:00:11 monet getty[543]: open /dev/ttyv1: No such file or directory >: > >: > Its an incredible pain in the ass to get spammed by these things on a >: > 9600 baud serial console while you're editing ttys to turn the damned >: > things off. I don't want to have to have 4 more lines of spam to >: > deal with when installing a new server. >: > >: > If you also fix getty to silently ignore the problem and go to sleep >: > forever, then I withdraw my objection. >: >: Index: init.c >: =================================================================== >: RCS file: /usr/cvs/src/sbin/init/init.c,v >: retrieving revision 1.51 >: diff -u -r1.51 init.c >: --- init.c 3 Aug 2002 16:21:33 -0000 1.51 >: +++ init.c 26 Sep 2002 15:56:57 -0000 >: @@ -939,7 +939,7 @@ >: * then don't add the device to the session list. >: */ >: if ((fd = open(sp->se_device, O_RDONLY | O_NONBLOCK, 0)) < 0) { >: - if (errno == ENXIO) { >: + if (errno == ENXIO || errno == ENOENT) { >: free_session(sp); >: return (0); >: } >: >: (Maybe we should detect devfs somewhere else and use >: || devfs_present && errno == ENOENT) instead.) > > Why? If someone hasn't done a MAKEDEV of the device, it is just as > dead. MAKEDEV + kill -1 1 will bring it back if they didn't > (untested, but it is the normal way to do these things). Agreed, that's why I said "maybe" b/c it would be preserving the behavior for the !devfs case. I agree that I think it should actually always just give up if the device file doesn't exist. So do people agree with this change? > Warner -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message