xref: /netbsd-src/sys/modules/srt/srt.c (revision aa88590260e53b521c23d1d67d88e9c33f102976)
1*aa885902Spgoyette /*	$NetBSD: srt.c,v 1.1 2019/03/26 00:36:14 pgoyette Exp $ */
2*aa885902Spgoyette 
3*aa885902Spgoyette /*-
4*aa885902Spgoyette  * Copyright (c) 2016 The NetBSD Foundation, Inc.
5*aa885902Spgoyette  * All rights reserved.
6*aa885902Spgoyette  *
7*aa885902Spgoyette  * This code is derived from software contributed to The NetBSD Foundation
8*aa885902Spgoyette  * by Paul Goyette
9*aa885902Spgoyette  *
10*aa885902Spgoyette  * Redistribution and use in source and binary forms, with or without
11*aa885902Spgoyette  * modification, are permitted provided that the following conditions
12*aa885902Spgoyette  * are met:
13*aa885902Spgoyette  * 1. Redistributions of source code must retain the above copyright
14*aa885902Spgoyette  *    notice, this list of conditions and the following disclaimer.
15*aa885902Spgoyette  * 2. Redistributions in binary form must reproduce the above copyright
16*aa885902Spgoyette  *    notice, this list of conditions and the following disclaimer in the
17*aa885902Spgoyette  *    documentation and/or other materials provided with the distribution.
18*aa885902Spgoyette  *
19*aa885902Spgoyette  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*aa885902Spgoyette  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*aa885902Spgoyette  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*aa885902Spgoyette  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*aa885902Spgoyette  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*aa885902Spgoyette  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*aa885902Spgoyette  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*aa885902Spgoyette  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*aa885902Spgoyette  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*aa885902Spgoyette  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*aa885902Spgoyette  * POSSIBILITY OF SUCH DAMAGE.
30*aa885902Spgoyette  */
31*aa885902Spgoyette 
32*aa885902Spgoyette #include <sys/cdefs.h>
33*aa885902Spgoyette __KERNEL_RCSID(0, "$NetBSD: srt.c,v 1.1 2019/03/26 00:36:14 pgoyette Exp $");
34*aa885902Spgoyette 
35*aa885902Spgoyette #include <sys/errno.h>
36*aa885902Spgoyette #include <sys/module.h>
37*aa885902Spgoyette 
38*aa885902Spgoyette MODULE(MODULE_CLASS_DRIVER, srt, "if_srt");
39*aa885902Spgoyette 
40*aa885902Spgoyette static int
srt_modcmd(modcmd_t cmd,void * arg)41*aa885902Spgoyette srt_modcmd(modcmd_t cmd, void *arg)
42*aa885902Spgoyette {
43*aa885902Spgoyette 
44*aa885902Spgoyette 	switch (cmd) {
45*aa885902Spgoyette 	case MODULE_CMD_INIT:
46*aa885902Spgoyette 	case MODULE_CMD_FINI:
47*aa885902Spgoyette 		return 0;
48*aa885902Spgoyette 	default:
49*aa885902Spgoyette 		return ENOTTY;
50*aa885902Spgoyette 	}
51*aa885902Spgoyette }
52