Deleted Added
full compact
daemon_saver.c (72797) daemon_saver.c (109623)
1/*-
2 * Copyright (c) 1997 Sandro Sigala, Brescia, Italy.
3 * Copyright (c) 1997 Chris Shenton
4 * Copyright (c) 1995 S ren Schmidt
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 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) 1997 Sandro Sigala, Brescia, Italy.
3 * Copyright (c) 1997 Chris Shenton
4 * Copyright (c) 1995 S ren Schmidt
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 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/daemon/daemon_saver.c 72797 2001-02-21 11:28:02Z nyan $
28 * $FreeBSD: head/sys/dev/syscons/daemon/daemon_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>

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

378 return 0;
379}
380
381static int
382daemon_init(video_adapter_t *adp)
383{
384 messagelen = strlen(hostname) + 3 + strlen(ostype) + 1 +
385 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>

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

378 return 0;
379}
380
381static int
382daemon_init(video_adapter_t *adp)
383{
384 messagelen = strlen(hostname) + 3 + strlen(ostype) + 1 +
385 strlen(osrelease);
386 message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
386 message = malloc(messagelen + 1, M_DEVBUF, 0);
387 sprintf(message, "%s - %s %s", hostname, ostype, osrelease);
388 blanked = 0;
389 return 0;
390}
391
392static int
393daemon_term(video_adapter_t *adp)
394{
395 free(message, M_DEVBUF);
396 return 0;
397}
398
399static scrn_saver_t daemon_module = {
400 "daemon_saver", daemon_init, daemon_term, daemon_saver, NULL,
401};
402
403SAVER_MODULE(daemon_saver, daemon_module);
387 sprintf(message, "%s - %s %s", hostname, ostype, osrelease);
388 blanked = 0;
389 return 0;
390}
391
392static int
393daemon_term(video_adapter_t *adp)
394{
395 free(message, M_DEVBUF);
396 return 0;
397}
398
399static scrn_saver_t daemon_module = {
400 "daemon_saver", daemon_init, daemon_term, daemon_saver, NULL,
401};
402
403SAVER_MODULE(daemon_saver, daemon_module);