]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs mount: Consistently use ENODEV internally for an invalid fstype
authorJohn Baldwin <jhb@FreeBSD.org>
Sat, 18 Nov 2023 19:08:34 +0000 (11:08 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Sat, 18 Nov 2023 19:08:34 +0000 (11:08 -0800)
commit3eed4803f943e2937325e81140b88e2e8eea8deb
tree2c7057f13e804157b834db42b3b99ad153ce79aa
parentf06fda7ff14701905acb0089143ebf356c2a9b04
vfs mount: Consistently use ENODEV internally for an invalid fstype

Change vfs_byname_kld to always return an error value of ENODEV to
indicate an unsupported fstype leaving ENOENT to indicate errors such
as a missing mount point or invalid path.  This allows nmount(2) to
better distinguish these cases and avoid treating a missing device
node as an invalid fstype after commit 6e8272f317b8.

While here, change mount(2) to return EINVAL instead of ENODEV for an
invalid fstype to match nmount(2).

PR: 274600
Reviewed by: pstef, markj
Differential Revision: https://reviews.freebsd.org/D42327
sys/kern/vfs_init.c
sys/kern/vfs_mount.c