svn commit: r288984 - head/sbin/sysctl

Steven Hartland steven.hartland at multiplay.co.uk
Wed Oct 7 22:45:21 UTC 2015



On 07/10/2015 23:41, NGie Cooper wrote:
> On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin <bapt at 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.


More information about the svn-src-head mailing list