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

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

Best regards,
Bapt

Attachment: signature.asc
Description: PGP signature

Reply via email to