Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Oct 2015 14:56:02 -0700
From:      Conrad Meyer <cem@FreeBSD.org>
To:        Baptiste Daroussin <bapt@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r288984 - head/sbin/sysctl
Message-ID:  <CAG6CVpVdOeUFg3cSffTKcn9T2SGvLMhERiesecwZ6aoeAjpLjA@mail.gmail.com>
In-Reply-To: <201510070928.t979SsMQ057994@repo.freebsd.org>
References:  <201510070928.t979SsMQ057994@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 7, 2015 at 2:28 AM, Baptiste Daroussin <bapt@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?

> +                       }
>                         return (1);
>                 }
>         }
>

Best,
Conrad



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