dcons.c (125862) | dcons.c (126076) |
---|---|
1/* 2 * Copyright (C) 2003 3 * Hidetoshi Shimokawa. 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 --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * $Id: dcons.c,v 1.65 2003/10/24 03:24:55 simokawa Exp $ | 1/* 2 * Copyright (C) 2003 3 * Hidetoshi Shimokawa. 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 --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * $Id: dcons.c,v 1.65 2003/10/24 03:24:55 simokawa Exp $ |
35 * $FreeBSD: head/sys/dev/dcons/dcons.c 125862 2004-02-16 07:25:46Z simokawa $ | 35 * $FreeBSD: head/sys/dev/dcons/dcons.c 126076 2004-02-21 19:42:58Z phk $ |
36 */ 37 38#include <sys/param.h> 39#include <sys/kernel.h> 40#include <sys/systm.h> 41#include <sys/types.h> 42#include <sys/conf.h> 43#include <sys/cons.h> --- 32 unchanged lines hidden (view full) --- 76#define DCONS_FORCE_GDB 1 77#endif 78 79#if __FreeBSD_version >= 500101 80#define CONS_NODEV 1 /* for latest current */ 81static struct consdev gdbconsdev; 82#endif 83 | 36 */ 37 38#include <sys/param.h> 39#include <sys/kernel.h> 40#include <sys/systm.h> 41#include <sys/types.h> 42#include <sys/conf.h> 43#include <sys/cons.h> --- 32 unchanged lines hidden (view full) --- 76#define DCONS_FORCE_GDB 1 77#endif 78 79#if __FreeBSD_version >= 500101 80#define CONS_NODEV 1 /* for latest current */ 81static struct consdev gdbconsdev; 82#endif 83 |
84#define CDEV_MAJOR 184 | |
85 86static d_open_t dcons_open; 87static d_close_t dcons_close; 88static d_ioctl_t dcons_ioctl; 89 90static struct cdevsw dcons_cdevsw = { 91#if __FreeBSD_version >= 500104 92 .d_open = dcons_open, 93 .d_close = dcons_close, 94 .d_read = ttyread, 95 .d_write = ttywrite, 96 .d_ioctl = dcons_ioctl, 97 .d_poll = ttypoll, 98 .d_name = "dcons", | 84 85static d_open_t dcons_open; 86static d_close_t dcons_close; 87static d_ioctl_t dcons_ioctl; 88 89static struct cdevsw dcons_cdevsw = { 90#if __FreeBSD_version >= 500104 91 .d_open = dcons_open, 92 .d_close = dcons_close, 93 .d_read = ttyread, 94 .d_write = ttywrite, 95 .d_ioctl = dcons_ioctl, 96 .d_poll = ttypoll, 97 .d_name = "dcons", |
99 .d_maj = CDEV_MAJOR, | |
100#else 101 /* open */ dcons_open, 102 /* close */ dcons_close, 103 /* read */ ttyread, 104 /* write */ ttywrite, 105 /* ioctl */ dcons_ioctl, 106 /* poll */ ttypoll, 107 /* mmap */ nommap, --- 544 unchanged lines hidden --- | 98#else 99 /* open */ dcons_open, 100 /* close */ dcons_close, 101 /* read */ ttyread, 102 /* write */ ttywrite, 103 /* ioctl */ dcons_ioctl, 104 /* poll */ ttypoll, 105 /* mmap */ nommap, --- 544 unchanged lines hidden --- |