Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162937411
D31540.id93696.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
953 B
Referenced Files
None
Subscribers
None
D31540.id93696.diff
View Options
Index: sys/kern/vfs_mount.c
===================================================================
--- sys/kern/vfs_mount.c
+++ sys/kern/vfs_mount.c
@@ -823,6 +823,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
@@ -1373,12 +1379,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
Sun, Jul 19, 12:05 PM (8 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35233347
Default Alt Text
D31540.id93696.diff (953 B)
Attached To
Mode
D31540: mount: improve error message for invalid filesystem names
Attached
Detach File
Event Timeline
Log In to Comment