Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Oct 2015 00:35:33 +0200
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        Conrad Meyer <cem@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r288984 - head/sbin/sysctl
Message-ID:  <20151007223533.GF91729@ivaldir.etoilebsd.net>
In-Reply-To: <CAG6CVpVdOeUFg3cSffTKcn9T2SGvLMhERiesecwZ6aoeAjpLjA@mail.gmail.com>
References:  <201510070928.t979SsMQ057994@repo.freebsd.org> <CAG6CVpVdOeUFg3cSffTKcn9T2SGvLMhERiesecwZ6aoeAjpLjA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--L2Brqb15TUChFOBK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 07, 2015 at 02:56:02PM -0700, Conrad Meyer wrote:
> On Wed, Oct 7, 2015 at 2:28 AM, Baptiste Daroussin <bapt@freebsd.org> wro=
te:
> > --- head/sbin/sysctl/sysctl.c   Wed Oct  7 09:12:49 2015        (r28898=
3)
> > +++ head/sbin/sysctl/sysctl.c   Wed Oct  7 09:28:54 2015        (r28898=
4)
> > @@ -276,7 +276,11 @@ parse(const char *string, int lineno)
> >                 if (qflag)
> >                         return (1);
> >                 else {
> > -                       warn("unknown oid '%s'%s", bufp, line);
> > +                       if (errno =3D=3D ENOENT) {
> > +                               warnx("unknown oid '%s'%s", bufp, line);
> > +                       } else {
> > +                               warn("unknown oid '%s'%s", bufp, line);
>=20
> Is "unknown oid" an appropriate warning for errno !=3D ENOENT?

I do not think it is, but I couldn't find a way to reproduce another case t=
han
ENOENT, so I thought maybe the best would be to keep the current behaviour =
for
other cases :)

Best regards,
Bapt

--L2Brqb15TUChFOBK
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlYVnjUACgkQ8kTtMUmk6ExvPgCgqRAfz3BxreD1eoS2QFdWfklV
3BQAnjRos9wGMxd6ou/yGjghNw5EJIIg
=lSMh
-----END PGP SIGNATURE-----

--L2Brqb15TUChFOBK--



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