From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 5 20:36:47 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF68D106566C for ; Wed, 5 Aug 2009 20:36:47 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9DF598FC15 for ; Wed, 5 Aug 2009 20:36:47 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 54DFD1A3D39; Wed, 5 Aug 2009 13:36:47 -0700 (PDT) Date: Wed, 5 Aug 2009 13:36:47 -0700 From: Alfred Perlstein To: Dimitry Andric Message-ID: <20090805203647.GX47463@elvis.mu.org> References: <200908041245.35926.mel.flynn+fbsd.hackers@mailing.thruhere.net> <4A78AB7C.3040406@andric.com> <200908041615.49128.mel.flynn+fbsd.hackers@mailing.thruhere.net> <4A798E1B.9010109@andric.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A798E1B.9010109@andric.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, Mel Flynn Subject: Re: Spot the error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2009 20:36:48 -0000 * Dimitry Andric [090805 06:51] wrote: > On 2009-08-05 02:15, Mel Flynn wrote: > > I would expect "Unable to load fs: " + ENOENT. I was asking if this was > > fixable, cause it looked like the code has been abstracted to the point that > > specific errors were hard, but maybe I missed something. > > It does not seem easily fixable. The problem is that the mount command > simply prints out the error of the system call, and doesn't have any > idea which of the (many) parameters was wrong. > > You could change the returned error in this particular case to ENOENT, > of course, but that might be considered even more confusing. Like, > "What do you mean, that SCSI disk doesn't exist? It's right there in > /dev!" > > One could also argue for EINVAL, but there's the bikeshed again... :) mount 9 could be augmented to preflight/postflight the vfs type name through the provide a better error. -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer