Date: Fri, 23 Oct 2020 08:44:54 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366961 - head/sys/fs/cuse Message-ID: <202010230844.09N8isn6016407@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Fri Oct 23 08:44:53 2020 New Revision: 366961 URL: https://svnweb.freebsd.org/changeset/base/366961 Log: 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 Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Fri Oct 23 06:24:38 2020 (r366960) +++ head/sys/fs/cuse/cuse.c Fri Oct 23 08:44:53 2020 (r366961) @@ -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); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010230844.09N8isn6016407>