diff options
author | peter <peter@FreeBSD.org> | 1998-11-04 03:49:39 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-11-04 03:49:39 +0000 |
commit | 51a1d0307e752ea1ed3a8ab81afab8199c0de4b7 (patch) | |
tree | 17e976498fdc22830a1cceefc7b107a523618a6a | |
parent | 41affade8bfc58dbc7225c6433b3fbf7ed8b6d05 (diff) | |
download | FreeBSD-src-51a1d0307e752ea1ed3a8ab81afab8199c0de4b7.zip FreeBSD-src-51a1d0307e752ea1ed3a8ab81afab8199c0de4b7.tar.gz |
Simple update to make these work as kld and preload modules.
-rw-r--r-- | sys/dev/syscons/blank/blank_saver.c | 20 | ||||
-rw-r--r-- | sys/dev/syscons/daemon/daemon_saver.c | 19 | ||||
-rw-r--r-- | sys/dev/syscons/fade/fade_saver.c | 20 | ||||
-rw-r--r-- | sys/dev/syscons/green/green_saver.c | 20 | ||||
-rw-r--r-- | sys/dev/syscons/snake/snake_saver.c | 19 | ||||
-rw-r--r-- | sys/dev/syscons/star/star_saver.c | 20 | ||||
-rw-r--r-- | sys/modules/syscons/blank/blank_saver.c | 20 | ||||
-rw-r--r-- | sys/modules/syscons/daemon/daemon_saver.c | 19 | ||||
-rw-r--r-- | sys/modules/syscons/fade/fade_saver.c | 20 | ||||
-rw-r--r-- | sys/modules/syscons/green/green_saver.c | 20 | ||||
-rw-r--r-- | sys/modules/syscons/saver.h | 23 | ||||
-rw-r--r-- | sys/modules/syscons/snake/snake_saver.c | 19 | ||||
-rw-r--r-- | sys/modules/syscons/star/star_saver.c | 20 |
13 files changed, 90 insertions, 169 deletions
diff --git a/sys/dev/syscons/blank/blank_saver.c b/sys/dev/syscons/blank/blank_saver.c index 1bb7323..9ad6e3f 100644 --- a/sys/dev/syscons/blank/blank_saver.c +++ b/sys/dev/syscons/blank/blank_saver.c @@ -25,21 +25,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: blank_saver.c,v 1.12 1998/09/15 18:16:38 sos Exp $ + * $Id: blank_saver.c,v 1.13 1998/09/17 19:40:29 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <i386/isa/isa.h> #include <saver.h> -MOD_MISC(blank_saver); - static void blank_saver(int blank) { @@ -91,7 +88,7 @@ blank_saver(int blank) } static int -blank_saver_load(struct lkm_table *lkmtp, int cmd) +blank_saver_load(void) { switch (crtc_type) { case KD_MONO: @@ -108,14 +105,9 @@ blank_saver_load(struct lkm_table *lkmtp, int cmd) } static int -blank_saver_unload(struct lkm_table *lkmtp, int cmd) +blank_saver_unload(void) { return remove_scrn_saver(blank_saver); } -int -blank_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(blank_saver, lkmtp, cmd, ver, - blank_saver_load, blank_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(blank_saver); diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c index 59e99f0..d3f9036 100644 --- a/sys/dev/syscons/daemon/daemon_saver.c +++ b/sys/dev/syscons/daemon/daemon_saver.c @@ -25,14 +25,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: daemon_saver.c,v 1.10 1998/09/15 18:16:38 sos Exp $ + * $Id: daemon_saver.c,v 1.11 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/malloc.h> #include <sys/kernel.h> #include <sys/sysctl.h> @@ -48,8 +46,6 @@ #define DAEMON_MAX_WIDTH 32 #define DAEMON_MAX_HEIGHT 19 -MOD_MISC(daemon_saver); - static char *message; static int messagelen; static u_short *window; @@ -335,7 +331,7 @@ daemon_saver(int blank) } static int -daemon_saver_load(struct lkm_table *lkmtp, int cmd) +daemon_saver_load(void) { int err; @@ -351,7 +347,7 @@ daemon_saver_load(struct lkm_table *lkmtp, int cmd) } static int -daemon_saver_unload(struct lkm_table *lkmtp, int cmd) +daemon_saver_unload(void) { int err; @@ -361,9 +357,4 @@ daemon_saver_unload(struct lkm_table *lkmtp, int cmd) return err; } -int -daemon_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(daemon_saver, lkmtp, cmd, ver, - daemon_saver_load, daemon_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(daemon_saver); diff --git a/sys/dev/syscons/fade/fade_saver.c b/sys/dev/syscons/fade/fade_saver.c index 0d31bd6..3a2cc0c 100644 --- a/sys/dev/syscons/fade/fade_saver.c +++ b/sys/dev/syscons/fade/fade_saver.c @@ -25,21 +25,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: fade_saver.c,v 1.13 1998/09/15 18:16:39 sos Exp $ + * $Id: fade_saver.c,v 1.14 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <i386/isa/isa.h> #include <saver.h> -MOD_MISC(fade_saver); - static void fade_saver(int blank) { @@ -103,7 +100,7 @@ fade_saver(int blank) } static int -fade_saver_load(struct lkm_table *lkmtp, int cmd) +fade_saver_load(void) { switch (crtc_type) { case KD_MONO: @@ -124,14 +121,9 @@ fade_saver_load(struct lkm_table *lkmtp, int cmd) } static int -fade_saver_unload(struct lkm_table *lkmtp, int cmd) +fade_saver_unload(void) { return remove_scrn_saver(fade_saver); } -int -fade_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(fade_saver, lkmtp, cmd, ver, - fade_saver_load, fade_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(fade_saver); diff --git a/sys/dev/syscons/green/green_saver.c b/sys/dev/syscons/green/green_saver.c index 0e61c2e..0491c67 100644 --- a/sys/dev/syscons/green/green_saver.c +++ b/sys/dev/syscons/green/green_saver.c @@ -25,21 +25,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: green_saver.c,v 1.12 1998/09/15 18:16:39 sos Exp $ + * $Id: green_saver.c,v 1.13 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <i386/isa/isa.h> #include <saver.h> -MOD_MISC(green_saver); - static void green_saver(int blank) { @@ -95,7 +92,7 @@ green_saver(int blank) } static int -green_saver_load(struct lkm_table *lkmtp, int cmd) +green_saver_load(void) { switch (crtc_type) { case KD_MONO: @@ -116,14 +113,9 @@ green_saver_load(struct lkm_table *lkmtp, int cmd) } static int -green_saver_unload(struct lkm_table *lkmtp, int cmd) +green_saver_unload(void) { return remove_scrn_saver(green_saver); } -int -green_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(green_saver, lkmtp, cmd, ver, - green_saver_load, green_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(green_saver); diff --git a/sys/dev/syscons/snake/snake_saver.c b/sys/dev/syscons/snake/snake_saver.c index efb76d5..3100ff3 100644 --- a/sys/dev/syscons/snake/snake_saver.c +++ b/sys/dev/syscons/snake/snake_saver.c @@ -25,14 +25,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: snake_saver.c,v 1.18 1998/09/15 18:16:39 sos Exp $ + * $Id: snake_saver.c,v 1.19 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/malloc.h> #include <sys/kernel.h> #include <sys/sysctl.h> @@ -42,8 +40,6 @@ #include <saver.h> -MOD_MISC(snake_saver); - static char *message; static u_char **messagep; static int messagelen; @@ -112,7 +108,7 @@ snake_saver(int blank) } static int -snake_saver_load(struct lkm_table *lkmtp, int cmd) +snake_saver_load(void) { int err; @@ -130,7 +126,7 @@ snake_saver_load(struct lkm_table *lkmtp, int cmd) } static int -snake_saver_unload(struct lkm_table *lkmtp, int cmd) +snake_saver_unload(void) { int err; @@ -142,9 +138,4 @@ snake_saver_unload(struct lkm_table *lkmtp, int cmd) return err; } -int -snake_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(snake_saver, lkmtp, cmd, ver, - snake_saver_load, snake_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(snake_saver); diff --git a/sys/dev/syscons/star/star_saver.c b/sys/dev/syscons/star/star_saver.c index 2e56a3c..719d502 100644 --- a/sys/dev/syscons/star/star_saver.c +++ b/sys/dev/syscons/star/star_saver.c @@ -25,22 +25,19 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: star_saver.c,v 1.15 1998/09/15 18:16:39 sos Exp $ + * $Id: star_saver.c,v 1.16 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <machine/md_var.h> #include <machine/pc/display.h> #include <saver.h> -MOD_MISC(star_saver); - #define NUM_STARS 50 static u_short *window; @@ -94,20 +91,15 @@ star_saver(int blank) } static int -star_saver_load(struct lkm_table *lkmtp, int cmd) +star_saver_load(void) { return add_scrn_saver(star_saver); } static int -star_saver_unload(struct lkm_table *lkmtp, int cmd) +star_saver_unload(void) { return remove_scrn_saver(star_saver); } -int -star_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(star_saver, lkmtp, cmd, ver, - star_saver_load, star_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(star_saver); diff --git a/sys/modules/syscons/blank/blank_saver.c b/sys/modules/syscons/blank/blank_saver.c index 1bb7323..9ad6e3f 100644 --- a/sys/modules/syscons/blank/blank_saver.c +++ b/sys/modules/syscons/blank/blank_saver.c @@ -25,21 +25,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: blank_saver.c,v 1.12 1998/09/15 18:16:38 sos Exp $ + * $Id: blank_saver.c,v 1.13 1998/09/17 19:40:29 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <i386/isa/isa.h> #include <saver.h> -MOD_MISC(blank_saver); - static void blank_saver(int blank) { @@ -91,7 +88,7 @@ blank_saver(int blank) } static int -blank_saver_load(struct lkm_table *lkmtp, int cmd) +blank_saver_load(void) { switch (crtc_type) { case KD_MONO: @@ -108,14 +105,9 @@ blank_saver_load(struct lkm_table *lkmtp, int cmd) } static int -blank_saver_unload(struct lkm_table *lkmtp, int cmd) +blank_saver_unload(void) { return remove_scrn_saver(blank_saver); } -int -blank_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(blank_saver, lkmtp, cmd, ver, - blank_saver_load, blank_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(blank_saver); diff --git a/sys/modules/syscons/daemon/daemon_saver.c b/sys/modules/syscons/daemon/daemon_saver.c index 59e99f0..d3f9036 100644 --- a/sys/modules/syscons/daemon/daemon_saver.c +++ b/sys/modules/syscons/daemon/daemon_saver.c @@ -25,14 +25,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: daemon_saver.c,v 1.10 1998/09/15 18:16:38 sos Exp $ + * $Id: daemon_saver.c,v 1.11 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/malloc.h> #include <sys/kernel.h> #include <sys/sysctl.h> @@ -48,8 +46,6 @@ #define DAEMON_MAX_WIDTH 32 #define DAEMON_MAX_HEIGHT 19 -MOD_MISC(daemon_saver); - static char *message; static int messagelen; static u_short *window; @@ -335,7 +331,7 @@ daemon_saver(int blank) } static int -daemon_saver_load(struct lkm_table *lkmtp, int cmd) +daemon_saver_load(void) { int err; @@ -351,7 +347,7 @@ daemon_saver_load(struct lkm_table *lkmtp, int cmd) } static int -daemon_saver_unload(struct lkm_table *lkmtp, int cmd) +daemon_saver_unload(void) { int err; @@ -361,9 +357,4 @@ daemon_saver_unload(struct lkm_table *lkmtp, int cmd) return err; } -int -daemon_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(daemon_saver, lkmtp, cmd, ver, - daemon_saver_load, daemon_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(daemon_saver); diff --git a/sys/modules/syscons/fade/fade_saver.c b/sys/modules/syscons/fade/fade_saver.c index 0d31bd6..3a2cc0c 100644 --- a/sys/modules/syscons/fade/fade_saver.c +++ b/sys/modules/syscons/fade/fade_saver.c @@ -25,21 +25,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: fade_saver.c,v 1.13 1998/09/15 18:16:39 sos Exp $ + * $Id: fade_saver.c,v 1.14 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <i386/isa/isa.h> #include <saver.h> -MOD_MISC(fade_saver); - static void fade_saver(int blank) { @@ -103,7 +100,7 @@ fade_saver(int blank) } static int -fade_saver_load(struct lkm_table *lkmtp, int cmd) +fade_saver_load(void) { switch (crtc_type) { case KD_MONO: @@ -124,14 +121,9 @@ fade_saver_load(struct lkm_table *lkmtp, int cmd) } static int -fade_saver_unload(struct lkm_table *lkmtp, int cmd) +fade_saver_unload(void) { return remove_scrn_saver(fade_saver); } -int -fade_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(fade_saver, lkmtp, cmd, ver, - fade_saver_load, fade_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(fade_saver); diff --git a/sys/modules/syscons/green/green_saver.c b/sys/modules/syscons/green/green_saver.c index 0e61c2e..0491c67 100644 --- a/sys/modules/syscons/green/green_saver.c +++ b/sys/modules/syscons/green/green_saver.c @@ -25,21 +25,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: green_saver.c,v 1.12 1998/09/15 18:16:39 sos Exp $ + * $Id: green_saver.c,v 1.13 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <i386/isa/isa.h> #include <saver.h> -MOD_MISC(green_saver); - static void green_saver(int blank) { @@ -95,7 +92,7 @@ green_saver(int blank) } static int -green_saver_load(struct lkm_table *lkmtp, int cmd) +green_saver_load(void) { switch (crtc_type) { case KD_MONO: @@ -116,14 +113,9 @@ green_saver_load(struct lkm_table *lkmtp, int cmd) } static int -green_saver_unload(struct lkm_table *lkmtp, int cmd) +green_saver_unload(void) { return remove_scrn_saver(green_saver); } -int -green_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(green_saver, lkmtp, cmd, ver, - green_saver_load, green_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(green_saver); diff --git a/sys/modules/syscons/saver.h b/sys/modules/syscons/saver.h index 9eb1995..8eba276 100644 --- a/sys/modules/syscons/saver.h +++ b/sys/modules/syscons/saver.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: saver.h,v 1.11 1998/09/15 18:16:38 sos Exp $ + * $Id: saver.h,v 1.12 1998/09/17 19:40:29 sos Exp $ */ #include <machine/apm_bios.h> #include <machine/console.h> @@ -42,3 +42,24 @@ extern int scrn_blanked; extern int fonts_loaded; extern char font_8[], font_14[], font_16[]; extern char palette[]; + +#define SAVER_MODULE(name) \ + static int name ## _modevent(module_t mod, modeventtype_t type, \ + void *data) \ + { \ + switch (type) { \ + case MOD_LOAD: \ + return name ## _load(); \ + case MOD_UNLOAD: \ + return name ## _unload(); \ + default: \ + break; \ + } \ + return 0; \ + } \ + static moduledata_t name ## _mod = { \ + #name, \ + name ## _modevent, \ + NULL \ + }; \ + DECLARE_MODULE(name, name ## _mod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE) diff --git a/sys/modules/syscons/snake/snake_saver.c b/sys/modules/syscons/snake/snake_saver.c index efb76d5..3100ff3 100644 --- a/sys/modules/syscons/snake/snake_saver.c +++ b/sys/modules/syscons/snake/snake_saver.c @@ -25,14 +25,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: snake_saver.c,v 1.18 1998/09/15 18:16:39 sos Exp $ + * $Id: snake_saver.c,v 1.19 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/module.h> #include <sys/malloc.h> #include <sys/kernel.h> #include <sys/sysctl.h> @@ -42,8 +40,6 @@ #include <saver.h> -MOD_MISC(snake_saver); - static char *message; static u_char **messagep; static int messagelen; @@ -112,7 +108,7 @@ snake_saver(int blank) } static int -snake_saver_load(struct lkm_table *lkmtp, int cmd) +snake_saver_load(void) { int err; @@ -130,7 +126,7 @@ snake_saver_load(struct lkm_table *lkmtp, int cmd) } static int -snake_saver_unload(struct lkm_table *lkmtp, int cmd) +snake_saver_unload(void) { int err; @@ -142,9 +138,4 @@ snake_saver_unload(struct lkm_table *lkmtp, int cmd) return err; } -int -snake_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(snake_saver, lkmtp, cmd, ver, - snake_saver_load, snake_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(snake_saver); diff --git a/sys/modules/syscons/star/star_saver.c b/sys/modules/syscons/star/star_saver.c index 2e56a3c..719d502 100644 --- a/sys/modules/syscons/star/star_saver.c +++ b/sys/modules/syscons/star/star_saver.c @@ -25,22 +25,19 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: star_saver.c,v 1.15 1998/09/15 18:16:39 sos Exp $ + * $Id: star_saver.c,v 1.16 1998/09/17 19:40:30 sos Exp $ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/exec.h> -#include <sys/sysent.h> -#include <sys/lkm.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <machine/md_var.h> #include <machine/pc/display.h> #include <saver.h> -MOD_MISC(star_saver); - #define NUM_STARS 50 static u_short *window; @@ -94,20 +91,15 @@ star_saver(int blank) } static int -star_saver_load(struct lkm_table *lkmtp, int cmd) +star_saver_load(void) { return add_scrn_saver(star_saver); } static int -star_saver_unload(struct lkm_table *lkmtp, int cmd) +star_saver_unload(void) { return remove_scrn_saver(star_saver); } -int -star_saver_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - MOD_DISPATCH(star_saver, lkmtp, cmd, ver, - star_saver_load, star_saver_unload, lkm_nullcmd); -} +SAVER_MODULE(star_saver); |