Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139440104
D31540.id95196.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
919 B
Referenced Files
None
Subscribers
None
D31540.id95196.diff
View Options
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -966,6 +966,12 @@
}
error = vfs_domount(td, fstype, fspath, fsflags, &optlist);
+ if (error == ENOENT) {
+ error = EINVAL;
+ if (errmsg != NULL)
+ strncpy(errmsg, "Invalid fstype", errmsg_len);
+ goto bail;
+ }
/*
* See if we can mount in the read-only mode if the error code suggests
@@ -1525,12 +1531,13 @@
vfsp = NULL;
if ((fsflags & MNT_UPDATE) == 0) {
/* Don't try to load KLDs if we're mounting the root. */
- if (fsflags & MNT_ROOTFS)
- vfsp = vfs_byname(fstype);
- else
- vfsp = vfs_byname_kld(fstype, td, &error);
- if (vfsp == NULL)
- return (ENODEV);
+ if (fsflags & MNT_ROOTFS) {
+ if ((vfsp = vfs_byname(fstype)) == NULL)
+ return (ENODEV);
+ } else {
+ if ((vfsp = vfs_byname_kld(fstype, td, &error)) == NULL)
+ return (error);
+ }
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 13, 2:59 AM (8 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26919156
Default Alt Text
D31540.id95196.diff (919 B)
Attached To
Mode
D31540: mount: improve error message for invalid filesystem names
Attached
Detach File
Event Timeline
Log In to Comment