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

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

141} ;
142
143#define UNIT(dev) minor(dev) /* assume one minor number per unit */
144
145typedef struct streams_softc *sc_p;
146
147static sc_p sca[NSTREAMS];
148
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

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

141} ;
142
143#define UNIT(dev) minor(dev) /* assume one minor number per unit */
144
145typedef struct streams_softc *sc_p;
146
147static sc_p sca[NSTREAMS];
148
149static void
150streamsattach(void *dummy)
151{
152 cdevsw_add_generic(CDEV_MAJOR, CDEV_MAJOR, &streams_cdevsw);
153}
154
155static int
156streams_modevent(module_t mod, int type, void *unused)
157{
158 switch (type) {
159 case MOD_LOAD:
160 streamsattach(NULL);
161 return 0;
162 case MOD_UNLOAD:
163 cdevsw[CDEV_MAJOR] = NULL; /* clean up cdev */
164 return 0;
165 default:
166 break;
167 }
168 return 0;
169}
170
171static moduledata_t streams_mod = {
172 "streams",
173 streams_modevent,
174 0
175};
176DECLARE_MODULE(streams, streams_mod, SI_SUB_DRIVERS, SI_ORDER_ANY);
177
149/*
150 * We only need open() and close() routines. open() calls socreate()
151 * to allocate a "real" object behind the stream and mallocs some state
152 * info for use by the svr4 emulator; close() deallocates the state
153 * information and passes the underlying object to the normal socket close
154 * routine.
155 */
156static int

--- 263 unchanged lines hidden ---
178/*
179 * We only need open() and close() routines. open() calls socreate()
180 * to allocate a "real" object behind the stream and mallocs some state
181 * info for use by the svr4 emulator; close() deallocates the state
182 * information and passes the underlying object to the normal socket close
183 * routine.
184 */
185static int

--- 263 unchanged lines hidden ---