Bug 174918 - [vfs] Unknown mount filesystem error messages are confusing
Summary: [vfs] Unknown mount filesystem error messages are confusing
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.1-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-03 01:00 UTC by Enji Cooper
Modified: 2017-12-31 22:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2013-01-03 01:00:00 UTC
Error messages printed out by mount(2) are unfortunately not helpful when
trying to determine whether or not an unsupported (or non-existent)
filesystem is invoked. Example:

$ sudo mount -t foobarfs foo $PWD
mount: foo: Operation not supported by device

The issue is with the following call in vfs_mount.c:

1079                 if (vfsp == NULL)
1080                         return (ENODEV);
1081                 if (jailed(td->td_ucred) && !(vfsp->vfc_flags & VFCF_JAIL))
1082                         return (EPERM);

and this call in vfs_init.c:

131         /* Try to load the respective module. */
132         *error = kern_kldload(td, fstype, &fileid);
133         if (*error)
134                 return (NULL);

It seems like the error should be either EINVAL or ENOENT, but doing the latter
in mount(2) would be bad form.

How-To-Repeat: mount -t foobarfs foo /
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:15 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped