svn commit: r288984 - head/sbin/sysctl

Baptiste Daroussin bapt at freebsd.org
Wed Oct 7 22:35:39 UTC 2015


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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20151008/ebab5b50/attachment.bin>


More information about the svn-src-head mailing list