Spot the error

Alfred Perlstein alfred at freebsd.org
Wed Aug 5 20:36:48 UTC 2009


* Dimitry Andric <dimitry at andric.com> [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


More information about the freebsd-hackers mailing list