Deleted Added
full compact
green_saver.c (8871) green_saver.c (11857)
1/*-
2 * Copyright (c) 1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: green_saver.c,v 1.1 1995/02/22 13:47:14 sos Exp $
28 * $Id: green_saver.c,v 1.2 1995/05/30 06:06:17 rgrimes Exp $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/conf.h>
34#include <sys/exec.h>
35#include <sys/sysent.h>
36#include <sys/lkm.h>

--- 20 unchanged lines hidden (view full) ---

57 outb(TSIDX, 0x01); val = inb(TSREG);
58 outb(TSIDX, 0x01); outb(TSREG, val & 0xDF);
59 outb(crtc_addr, 0x17); val = inb(crtc_addr + 1);
60 outb(crtc_addr + 1, val | 0x80);
61 scrn_blanked = 0;
62 }
63}
64
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/conf.h>
34#include <sys/exec.h>
35#include <sys/sysent.h>
36#include <sys/lkm.h>

--- 20 unchanged lines hidden (view full) ---

57 outb(TSIDX, 0x01); val = inb(TSREG);
58 outb(TSIDX, 0x01); outb(TSREG, val & 0xDF);
59 outb(crtc_addr, 0x17); val = inb(crtc_addr + 1);
60 outb(crtc_addr + 1, val | 0x80);
61 scrn_blanked = 0;
62 }
63}
64
65saver_load(struct lkm_table *lkmtp, int cmd)
65green_saver_load(struct lkm_table *lkmtp, int cmd)
66{
67 (*current_saver)(0);
68 old_saver = current_saver;
69 current_saver = green_saver;
70 uprintf("green screen saver installed\n");
71 return 0;
72}
73
66{
67 (*current_saver)(0);
68 old_saver = current_saver;
69 current_saver = green_saver;
70 uprintf("green screen saver installed\n");
71 return 0;
72}
73
74saver_unload(struct lkm_table *lkmtp, int cmd)
74green_saver_unload(struct lkm_table *lkmtp, int cmd)
75{
76 (*current_saver)(0);
77 current_saver = old_saver;
78 uprintf("green screen saver removed\n");
79 return 0;
80}
81
75{
76 (*current_saver)(0);
77 current_saver = old_saver;
78 uprintf("green screen saver removed\n");
79 return 0;
80}
81
82saver_init(struct lkm_table *lkmtp, int cmd, int ver)
82green_saver_mod(struct lkm_table *lkmtp, int cmd, int ver)
83{
83{
84 DISPATCH(lkmtp, cmd, ver, saver_load, saver_unload, nosys);
84 DISPATCH(lkmtp, cmd, ver, green_saver_load, green_saver_unload, nosys);
85}
85}