From owner-svn-src-all@freebsd.org Wed Oct 7 22:41:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BEBF9D18C8; Wed, 7 Oct 2015 22:41:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09605D52; Wed, 7 Oct 2015 22:41:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkas79 with SMTP id s79so12141025qka.0; Wed, 07 Oct 2015 15:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DEOMcVm7q2JxL0KVJtHLMafL3ovSGi77jev0uq0ewZc=; b=qxWQzfyCqwd6fxkGmy4r9llbbzZR8Pu4Y+EopH0eyatAxiFPJrGk3go0FVIX0QZ6n8 lbkM5Tu8Uk7wNnD9hjMtm9F7Qw5frZlUVv/X29zYfaQWbTw8sXexTYVbB1iSm8JTzdI9 esLj8WvO8aH7fDpAXGcvCd4z62cJ04IpBibTmwK7Yxkjb6mlAcCoZVxoZxVrN8hBtd7e UmTazj29A1PNECV7Ci3VuC2JLwH82nsF44AFGPaZn+FVFI3Uv0dFFFyP9tOsi1944SxO vSyVaBO6RTB1jfile1KsaHWTZcJmQBsBPrfyLOBmel+sxo1YfGWG2QCEhybCW983tR0n x3Eg== MIME-Version: 1.0 X-Received: by 10.55.221.65 with SMTP id n62mr4518385qki.42.1444257713014; Wed, 07 Oct 2015 15:41:53 -0700 (PDT) Received: by 10.140.94.44 with HTTP; Wed, 7 Oct 2015 15:41:52 -0700 (PDT) In-Reply-To: <20151007223533.GF91729@ivaldir.etoilebsd.net> References: <201510070928.t979SsMQ057994@repo.freebsd.org> <20151007223533.GF91729@ivaldir.etoilebsd.net> Date: Wed, 7 Oct 2015 15:41:52 -0700 Message-ID: Subject: Re: svn commit: r288984 - head/sbin/sysctl From: NGie Cooper To: Baptiste Daroussin Cc: Conrad Meyer , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 22:41:54 -0000 On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin 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): # 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. Thanks! -NGie