Deleted Added
full compact
snake_saver.c (72797) snake_saver.c (109623)
1/*-
2 * Copyright (c) 1995-1998 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-1998 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 * $FreeBSD: head/sys/dev/syscons/snake/snake_saver.c 72797 2001-02-21 11:28:02Z nyan $
28 * $FreeBSD: head/sys/dev/syscons/snake/snake_saver.c 109623 2003-01-21 08:56:16Z alfred $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/module.h>
34#include <sys/malloc.h>
35#include <sys/kernel.h>
36#include <sys/sysctl.h>

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

126 }
127 return 0;
128}
129
130static int
131snake_init(video_adapter_t *adp)
132{
133 messagelen = strlen(ostype) + 1 + strlen(osrelease);
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/module.h>
34#include <sys/malloc.h>
35#include <sys/kernel.h>
36#include <sys/sysctl.h>

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

126 }
127 return 0;
128}
129
130static int
131snake_init(video_adapter_t *adp)
132{
133 messagelen = strlen(ostype) + 1 + strlen(osrelease);
134 message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
134 message = malloc(messagelen + 1, M_DEVBUF, 0);
135 sprintf(message, "%s %s", ostype, osrelease);
135 sprintf(message, "%s %s", ostype, osrelease);
136 messagep = malloc(messagelen * sizeof *messagep, M_DEVBUF, M_WAITOK);
136 messagep = malloc(messagelen * sizeof *messagep, M_DEVBUF, 0);
137 return 0;
138}
139
140static int
141snake_term(video_adapter_t *adp)
142{
143 free(message, M_DEVBUF);
144 free(messagep, M_DEVBUF);
145 return 0;
146}
147
148static scrn_saver_t snake_module = {
149 "snake_saver", snake_init, snake_term, snake_saver, NULL,
150};
151
152SAVER_MODULE(snake_saver, snake_module);
137 return 0;
138}
139
140static int
141snake_term(video_adapter_t *adp)
142{
143 free(message, M_DEVBUF);
144 free(messagep, M_DEVBUF);
145 return 0;
146}
147
148static scrn_saver_t snake_module = {
149 "snake_saver", snake_init, snake_term, snake_saver, NULL,
150};
151
152SAVER_MODULE(snake_saver, snake_module);