Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177618018
D57657.1794849392.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
751 B
Referenced Files
None
Subscribers
None
D57657.1794849392.diff
View Options
diff --git a/sys/contrib/openzfs/lib/libzfs/os/freebsd/libzfs_compat.c b/sys/contrib/openzfs/lib/libzfs/os/freebsd/libzfs_compat.c
--- a/sys/contrib/openzfs/lib/libzfs/os/freebsd/libzfs_compat.c
+++ b/sys/contrib/openzfs/lib/libzfs/os/freebsd/libzfs_compat.c
@@ -232,9 +232,14 @@
* in-base module.
*/
if (modfind("zfs") < 0) {
- /* Not present in kernel, try loading it. */
- if (kldload(ZFS_KMOD) < 0 && errno != EEXIST) {
- return (errno);
+ load_str = getenv("ZFS_AUTOLOAD_MODULE");
+ if (load_str && (!strncasecmp(load_str, "YES", strlen("YES"))) {
+ /* Not present in kernel, try loading it. */
+ if (kldload(ZFS_KMOD) < 0 && errno != EEXIST) {
+ return (errno);
+ }
+ } else {
+ return (ENXIO);
}
}
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 5:16 PM (10 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41784949
Default Alt Text
D57657.1794849392.diff (751 B)
Attached To
Mode
D57657: Make libzfs not autoload the ZFS module
Attached
Detach File
Event Timeline