Spot the error

Dimitry Andric dimitry at andric.com
Wed Aug 5 13:50:20 UTC 2009


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... :)


More information about the freebsd-hackers mailing list