From owner-svn-src-all@freebsd.org Wed Oct 7 22:45:21 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 1B7529D1AA4 for ; Wed, 7 Oct 2015 22:45:21 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (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 84D9CFC5 for ; Wed, 7 Oct 2015 22:45:20 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by wicfx3 with SMTP id fx3so1059240wic.0 for ; Wed, 07 Oct 2015 15:45:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=ZbxlPX6G6JvcjXRlhkZp1Xrfqyj35GmDQCJva401pXw=; b=Q49w034AdT1GYHKlzzT93WM8iymE7OrEngYH1ogd7pOsatuSFMjziuOgJnqPyiIFs3 FMthT53L7dQfCslYQkBj7OGpYkUP9IKri5VgvY82drSRfiWPd4AoNv2MAvFPOAM65nIO OCQbqerNJyzw3kk8AGeIEpjelL0ZeVLa+z803396MSvDHwgfpgyhXbDlbWkMVrMq++rd c9ZSv+9+5JYuN1zUc1n6z8DgKmqy/gqU+MEDnsH8cB9bZdSE+FkiBq5LC38PmbqayQrU chKBAvnbnaIgWLqU0DZSAlv8xUT4AhYkKZ9/fGXzoqcT9ZVKxWtX7AlFCLEIngreOBoJ lLYA== X-Gm-Message-State: ALoCoQkLo+qORsHbCYhENnSwdKTxaIziFSA8+RQMG/0XY3hqABw1zooqAJxJyZA5pfMCSbo7ZJkD X-Received: by 10.180.74.175 with SMTP id u15mr151169wiv.66.1444257913187; Wed, 07 Oct 2015 15:45:13 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by smtp.gmail.com with ESMTPSA id bv2sm42073379wjc.11.2015.10.07.15.45.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Oct 2015 15:45:11 -0700 (PDT) Subject: Re: svn commit: r288984 - head/sbin/sysctl To: NGie Cooper , Baptiste Daroussin References: <201510070928.t979SsMQ057994@repo.freebsd.org> <20151007223533.GF91729@ivaldir.etoilebsd.net> Cc: Conrad Meyer , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Steven Hartland Message-ID: <5615A071.60203@multiplay.co.uk> Date: Wed, 7 Oct 2015 23:45:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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:45:21 -0000 On 07/10/2015 23:41, NGie Cooper wrote: > 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): 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.