Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Sep 2002 01:11:11 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        jhb@FreeBSD.ORG
Cc:        gallatin@cs.duke.edu, current@FreeBSD.ORG, mark@grondar.za
Subject:   Re: ttys patch - any objections?
Message-ID:  <20020927.011111.127772150.imp@bsdimp.com>
In-Reply-To: <XFMail.20020926120139.jhb@FreeBSD.org>
References:  <15763.8701.497010.29864@grasshopper.cs.duke.edu> <XFMail.20020926120139.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <XFMail.20020926120139.jhb@FreeBSD.org>
            John Baldwin <jhb@FreeBSD.ORG> 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).

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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