From owner-svn-src-all@freebsd.org Wed Oct 7 22:52:12 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 EB4449D00C0; Wed, 7 Oct 2015 22:52:11 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (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 7E490A0E; Wed, 7 Oct 2015 22:52:11 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiclk2 with SMTP id lk2so4318407wic.0; Wed, 07 Oct 2015 15:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=RlRkIIKAEZkO12mIaaFMK6brmsqUd9cepnKAQOcaEVk=; b=K82bLFxPihmT3OPVNhc79dIVx0c8tZL+HJPMA9O07QK9UKCMGE9F0bQoR1noT8neXP TfS74dyuyl5jaOUors8YpmcyCZKPALqzj8iAo/EHaZL8DDywdUbGktsrfV4HrcAU3IUT PfamHkkuvFjLusp0+vSvJDWV+i/0Z/wlrIe15c8kxe9eJWl7qBr1/ZGbyHJKkZtFqERs cWl1pMtzHnV63pCRI1L7YcuYZQSdYQEKiSisJ6p613HaPUX7JjqvOOIfoA0zlAYb47de RE1hceONXEZRB2BDGgBINStfXKLCxEuByY8uMf+4zsMWY4v0uGm07f5egfxLH4dklfe6 /vog== X-Received: by 10.180.223.102 with SMTP id qt6mr162654wic.11.1444258330040; Wed, 07 Oct 2015 15:52:10 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id hd7sm4491151wib.23.2015.10.07.15.52.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Oct 2015 15:52:09 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 8 Oct 2015 00:52:07 +0200 From: Baptiste Daroussin To: NGie Cooper Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Conrad Meyer Subject: Re: svn commit: r288984 - head/sbin/sysctl Message-ID: <20151007225207.GG91729@ivaldir.etoilebsd.net> References: <201510070928.t979SsMQ057994@repo.freebsd.org> <20151007223533.GF91729@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="reI/iBAAp9kzkmX4" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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:52:12 -0000 --reI/iBAAp9kzkmX4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 07, 2015 at 03:41:52PM -0700, NGie Cooper wrote: > On Wed, Oct 7, 2015 at 3:35 PM, Baptiste Daroussin wro= te: > ... > > I do not think it is, but I couldn't find a way to reproduce another ca= se than > > ENOENT, so I thought maybe the best would be to keep the current behavi= our for > > other cases :) >=20 > Can't hit ENOTDIR: >=20 > # sysctl kern=3Direallyshouldnotbedoingthis > sysctl: oid 'kern' isn't a leaf node And this is handle by sysctl(8) and never hit the code I modified >=20 > Can't hit EPERM: >=20 > # sysctl kern.boottime=3D1000 > sysctl: oid 'kern.boottime' is read only Same >=20 > Not sure how to hit EINVAL, other than maybe try and read a sysctl > that dynamically populates itself (this might trigger ENOMEM errors > though): >=20 > # sysctl kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda=3D1000 > sysctl: unknown oid > 'kern.i.am.a.fun.oid.or.something.like.that.yadda.yadda': No such file > or directory This is the one I fixed >=20 > FWIW I think Conrad's right though about fixing the message to be more > meaningful in the errno !=3D ENOENT case though. So you haven't hit any other case for the code I have modified. Bapt --reI/iBAAp9kzkmX4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYVohcACgkQ8kTtMUmk6Ew70ACgwfncW2+vSmxZnLvB+frqj3Ze BPwAoID9I0a9byDu8uSfLk3zms1ZOZOq =qPxd -----END PGP SIGNATURE----- --reI/iBAAp9kzkmX4--