streams.c (111119) | streams.c (111815) |
---|---|
1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * Copyright (c) 1997 Todd Vierling 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 --- 16 unchanged lines hidden (view full) --- 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Stolen from NetBSD /sys/compat/svr4/svr4_net.c. Pseudo-device driver 30 * skeleton produced from /usr/share/examples/drivers/make_pseudo_driver.sh 31 * in 3.0-980524-SNAP then hacked a bit (but probably not enough :-). 32 * | 1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * Copyright (c) 1997 Todd Vierling 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 --- 16 unchanged lines hidden (view full) --- 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Stolen from NetBSD /sys/compat/svr4/svr4_net.c. Pseudo-device driver 30 * skeleton produced from /usr/share/examples/drivers/make_pseudo_driver.sh 31 * in 3.0-980524-SNAP then hacked a bit (but probably not enough :-). 32 * |
33 * $FreeBSD: head/sys/dev/streams/streams.c 111119 2003-02-19 05:47:46Z imp $ | 33 * $FreeBSD: head/sys/dev/streams/streams.c 111815 2003-03-03 12:15:54Z phk $ |
34 */ 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> /* SYSINIT stuff */ 39#include <sys/conf.h> /* cdevsw stuff */ 40#include <sys/malloc.h> /* malloc region definitions */ 41#include <sys/file.h> --- 58 unchanged lines hidden (view full) --- 100 101static struct fileops svr4_netops = { 102 soo_read, soo_write, soo_ioctl, soo_poll, soo_kqfilter, 103 soo_stat, svr4_soo_close 104}; 105 106#define CDEV_MAJOR 103 107static struct cdevsw streams_cdevsw = { | 34 */ 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> /* SYSINIT stuff */ 39#include <sys/conf.h> /* cdevsw stuff */ 40#include <sys/malloc.h> /* malloc region definitions */ 41#include <sys/file.h> --- 58 unchanged lines hidden (view full) --- 100 101static struct fileops svr4_netops = { 102 soo_read, soo_write, soo_ioctl, soo_poll, soo_kqfilter, 103 soo_stat, svr4_soo_close 104}; 105 106#define CDEV_MAJOR 103 107static struct cdevsw streams_cdevsw = { |
108 /* open */ streamsopen, 109 /* close */ noclose, 110 /* read */ noread, 111 /* write */ nowrite, 112 /* ioctl */ noioctl, 113 /* poll */ nopoll, 114 /* mmap */ nommap, 115 /* strategy */ nostrategy, 116 /* name */ "streams", 117 /* maj */ CDEV_MAJOR, 118 /* dump */ nodump, 119 /* psize */ nopsize, 120 /* flags */ 0, | 108 .d_open = streamsopen, 109 .d_name = "streams", 110 .d_maj = CDEV_MAJOR, |
121}; 122 123struct streams_softc { 124 struct isa_device *dev; 125} ; 126 127#define UNIT(dev) minor(dev) /* assume one minor number per unit */ 128 --- 300 unchanged lines hidden --- | 111}; 112 113struct streams_softc { 114 struct isa_device *dev; 115} ; 116 117#define UNIT(dev) minor(dev) /* assume one minor number per unit */ 118 --- 300 unchanged lines hidden --- |