Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Oct 2020 08:05:48 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r367157 - stable/12/sys/fs/cuse
Message-ID:  <202010300805.09U85mCo038892@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Oct 30 08:05:47 2020
New Revision: 367157
URL: https://svnweb.freebsd.org/changeset/base/367157

Log:
  MFC r366961:
  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>
  Sponsored by:		Mellanox Technologies // NVIDIA Networking

Modified:
  stable/12/sys/fs/cuse/cuse.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/cuse/cuse.c
==============================================================================
--- stable/12/sys/fs/cuse/cuse.c	Fri Oct 30 06:30:46 2020	(r367156)
+++ stable/12/sys/fs/cuse/cuse.c	Fri Oct 30 08:05:47 2020	(r367157)
@@ -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?202010300805.09U85mCo038892>