Deleted Added
full compact
streams.c (47640) streams.c (49263)
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

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

24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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 :-).
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

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

24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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 * $Id$
32 */
33
34 */
35
34
35#include "streams.h" /* generated file.. defines NSTREAMS */
36#include "opt_devfs.h"
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h> /* SYSINIT stuff */
40#include <sys/conf.h> /* cdevsw stuff */
41#include <sys/malloc.h> /* malloc region definitions */
42#include <sys/file.h>

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

385 * Occurs ONCE during boot (very early).
386 */
387static void
388streams_drvinit(void *unused)
389{
390 int unit;
391 sc_p scp = sca[unit];
392
36#include "streams.h" /* generated file.. defines NSTREAMS */
37#include "opt_devfs.h"
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/kernel.h> /* SYSINIT stuff */
41#include <sys/conf.h> /* cdevsw stuff */
42#include <sys/malloc.h> /* malloc region definitions */
43#include <sys/file.h>

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

386 * Occurs ONCE during boot (very early).
387 */
388static void
389streams_drvinit(void *unused)
390{
391 int unit;
392 sc_p scp = sca[unit];
393
393 cdevsw_add(&streams_cdevsw);
394 for (unit = 0; unit < NSTREAMS; unit++) {
395 /*
396 * Allocate storage for this instance .
397 */
398 scp = malloc(sizeof(*scp), M_DEVBUF, M_NOWAIT);
399 if( scp == NULL) {
400 printf("streams%d failed to allocate strorage\n", unit);
401 return ;

--- 44 unchanged lines hidden ---
394 for (unit = 0; unit < NSTREAMS; unit++) {
395 /*
396 * Allocate storage for this instance .
397 */
398 scp = malloc(sizeof(*scp), M_DEVBUF, M_NOWAIT);
399 if( scp == NULL) {
400 printf("streams%d failed to allocate strorage\n", unit);
401 return ;

--- 44 unchanged lines hidden ---