aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2020-10-23 08:44:53 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2020-10-23 08:44:53 +0000
commita71074e0af2b37a3f9082bafb8a0a0feb3cd4515 (patch)
tree125e199879544a968c73b8f3acc3c9808e163cb5 /sys/fs
parentccfd886a1b36fe923137cf197c87f013a134a0ff (diff)
downloadsrc-a71074e0af2b37a3f9082bafb8a0a0feb3cd4515.tar.gz
src-a71074e0af2b37a3f9082bafb8a0a0feb3cd4515.zip
Fix for loading cuse.ko via rc.d . Make sure we declare the cuse(3)
module by name and not only by the version information, so that "kldstat -q -m cuse" works. Found by: Goran Mekic <meka@tilda.center> MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
Notes
Notes: svn path=/head/; revision=366961
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/cuse/cuse.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c
index ccb0a901e2d2..a893250043c4 100644
--- a/sys/fs/cuse/cuse.c
+++ b/sys/fs/cuse/cuse.c
@@ -64,6 +64,24 @@
#include <fs/cuse/cuse_defs.h>
#include <fs/cuse/cuse_ioctl.h>
+static int
+cuse_modevent(module_t mod, int type, void *data)
+{
+ switch (type) {
+ case MOD_LOAD:
+ case MOD_UNLOAD:
+ return (0);
+ default:
+ return (EOPNOTSUPP);
+ }
+}
+
+static moduledata_t cuse_mod = {
+ .name = "cuse",
+ .evhand = &cuse_modevent,
+};
+
+DECLARE_MODULE(cuse, cuse_mod, SI_SUB_DEVFS, SI_ORDER_FIRST);
MODULE_VERSION(cuse, 1);
/*