Re: init question

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 15 Mar 2004 15:51:47 -0500
On Saturday 13 March 2004 04:51 am, a.s. mitrohin wrote:
> helo.
>
> CURRENT unable to start program for /etc/ttys entry
>
> pid_file "program --pid" unknown on
>
> but this is ok for RELENG_4
>
>
> if this have no fatal effects, please remove check
> ENOENT. RELENG_4 have no this in condition.

It was removed because with devfs, device entries don't always exist, so an 
unconfigured device is now going to result in ENOENT rather than ENXIO.  The 
example I think was on Alpha which has a /dev/zs0 console on some machines 
and on machines that don't have zs0, log messages about failing to open zs0 
would spam the console.

> Index: init.c
> ===================================================================
> RCS file: /usr/cvs/freebsd/ncvs/src/sbin/init/init.c,v
> retrieving revision 1.51
> retrieving revision 1.52
> diff -u -r1.51 -r1.52
> --- init.c      3 Aug 2002 16:21:33 -0000       1.51
> +++ init.c      27 Sep 2002 16:02:28 -0000      1.52
> _at__at_ -45,7 +45,7 _at__at_
>   static char sccsid[] = "_at_(#)init.c     8.1 (Berkeley) 7/15/93";
>   #endif
>   static const char rcsid[] =
> -  "$FreeBSD: src/sbin/init/init.c,v 1.51 2002/08/03 16:21:33 mux Exp $";
> +  "$FreeBSD: src/sbin/init/init.c,v 1.52 2002/09/27 16:02:28 jhb Exp $";
>   #endif /* not lint */
>
>   #include <sys/param.h>
> _at__at_ -939,7 +939,7 _at__at_
>           * 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);
>                  }
>
>
> ?
> sorry for my terrible english...
>
> /swp
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Mon Mar 15 2004 - 13:39:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:47 UTC