Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Oct 2015 23:45:05 +0100
From:      Steven Hartland <steven.hartland@multiplay.co.uk>
To:        NGie Cooper <yaneurabeya@gmail.com>, Baptiste Daroussin <bapt@freebsd.org>
Cc:        Conrad Meyer <cem@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r288984 - head/sbin/sysctl
Message-ID:  <5615A071.60203@multiplay.co.uk>
In-Reply-To: <CAGHfRMBV7%2BECQshL=F8XuASQDNr1FSwFix2aDd5cOa4ecF0yRQ@mail.gmail.com>
References:  <201510070928.t979SsMQ057994@repo.freebsd.org> <CAG6CVpVdOeUFg3cSffTKcn9T2SGvLMhERiesecwZ6aoeAjpLjA@mail.gmail.com> <20151007223533.GF91729@ivaldir.etoilebsd.net> <CAGHfRMBV7%2BECQshL=F8XuASQDNr1FSwFix2aDd5cOa4ecF0yRQ@mail.gmail.com>

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


On 07/10/2015 23:41, NGie Cooper wrote:
> On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin <bapt@freebsd.org> wrote:
> ...
>> 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 :)
> Can't hit ENOTDIR:
>
> # sysctl kern=ireallyshouldnotbedoingthis
> sysctl: oid 'kern' isn't a leaf node
>
> Can't hit EPERM:
>
> # sysctl kern.boottime=1000
> sysctl: oid 'kern.boottime' is read only
>
> Not sure how to hit EINVAL, other than maybe try and read a sysctl
> that dynamically populates itself (this might trigger ENOMEM errors
> though):
Assign a valid which a sysctl func rejects?
> # sysctl kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda=1000
> sysctl: unknown oid
> 'kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda': No such file
> or directory
>
> FWIW I think Conrad's right though about fixing the message to be more
> meaningful in the errno != ENOENT case though.



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