xref: /freebsd/sys/dev/zlib/zlib_mod.c (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1*0ed1d6fbSXin LI /*-
2*0ed1d6fbSXin LI  * SPDX-License-Identifier: BSD-2-Clause
3*0ed1d6fbSXin LI  *
4*0ed1d6fbSXin LI  * Copyright (c) 2019 The FreeBSD Foundation
5*0ed1d6fbSXin LI  *
6*0ed1d6fbSXin LI  * Redistribution and use in source and binary forms, with or without
7*0ed1d6fbSXin LI  * modification, are permitted provided that the following conditions
8*0ed1d6fbSXin LI  * are met:
9*0ed1d6fbSXin LI  * 1. Redistributions of source code must retain the above copyright
10*0ed1d6fbSXin LI  *    notice, this list of conditions and the following disclaimer.
11*0ed1d6fbSXin LI  * 2. Redistributions in binary form must reproduce the above copyright
12*0ed1d6fbSXin LI  *    notice, this list of conditions and the following disclaimer in the
13*0ed1d6fbSXin LI  *    documentation and/or other materials provided with the distribution.
14*0ed1d6fbSXin LI  *
15*0ed1d6fbSXin LI  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16*0ed1d6fbSXin LI  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*0ed1d6fbSXin LI  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*0ed1d6fbSXin LI  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19*0ed1d6fbSXin LI  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*0ed1d6fbSXin LI  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21*0ed1d6fbSXin LI  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*0ed1d6fbSXin LI  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*0ed1d6fbSXin LI  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*0ed1d6fbSXin LI  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*0ed1d6fbSXin LI  * SUCH DAMAGE.
26*0ed1d6fbSXin LI  */
27*0ed1d6fbSXin LI 
28*0ed1d6fbSXin LI #include <sys/param.h>
29*0ed1d6fbSXin LI #include <sys/time.h>
30*0ed1d6fbSXin LI #include <sys/kernel.h>
31*0ed1d6fbSXin LI #include <sys/module.h>
32*0ed1d6fbSXin LI 
33*0ed1d6fbSXin LI static int
zlib_modevent(module_t mod,int type,void * unused)34*0ed1d6fbSXin LI zlib_modevent(module_t mod, int type, void *unused)
35*0ed1d6fbSXin LI {
36*0ed1d6fbSXin LI 	switch (type) {
37*0ed1d6fbSXin LI 	case MOD_LOAD:
38*0ed1d6fbSXin LI 		return 0;
39*0ed1d6fbSXin LI 	case MOD_UNLOAD:
40*0ed1d6fbSXin LI 		return 0;
41*0ed1d6fbSXin LI 	}
42*0ed1d6fbSXin LI 	return EINVAL;
43*0ed1d6fbSXin LI }
44*0ed1d6fbSXin LI 
45*0ed1d6fbSXin LI static moduledata_t zlib_mod = {
46*0ed1d6fbSXin LI 	"zlib",
47*0ed1d6fbSXin LI 	zlib_modevent,
48*0ed1d6fbSXin LI 	0
49*0ed1d6fbSXin LI };
50*0ed1d6fbSXin LI DECLARE_MODULE(zlib, zlib_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
51*0ed1d6fbSXin LI MODULE_VERSION(zlib, 1);
52