View | Details | Raw Unified | Return to bug 208464 | Differences between
and this patch

Collapse All | Expand All

(-)sys/modules/streams/Makefile (-4 lines)
Lines 5-14 Link Here
5
KMOD=	streams
5
KMOD=	streams
6
SRCS=	streams.c
6
SRCS=	streams.c
7
7
8
EXPORT_SYMS=	svr4_str_initialized	\
9
		svr4_stream_get		\
10
		svr4_delete_socket
11
12
.if defined(DEBUG)
8
.if defined(DEBUG)
13
CFLAGS+= -DDEBUG_SVR4
9
CFLAGS+= -DDEBUG_SVR4
14
.endif
10
.endif
(-)sys/modules/svr4/Makefile (+1 lines)
Lines 8-13 Link Here
8
	svr4_termios.c svr4_stream.c svr4_socket.c svr4_sockio.c \
8
	svr4_termios.c svr4_stream.c svr4_socket.c svr4_sockio.c \
9
	svr4_machdep.c svr4_resource.c svr4_ipc.c
9
	svr4_machdep.c svr4_resource.c svr4_ipc.c
10
OBJS=	svr4_locore.o 
10
OBJS=	svr4_locore.o 
11
EXPORT_SYMS= svr4_delete_socket
11
12
12
SRCS+=	opt_ktrace.h opt_sysvipc.h
13
SRCS+=	opt_ktrace.h opt_sysvipc.h
13
14
(-)sys/dev/streams/streams.c (-13 / +1 lines)
Lines 176-181 Link Here
176
};
176
};
177
DECLARE_MODULE(streams, streams_mod, SI_SUB_DRIVERS, SI_ORDER_ANY);
177
DECLARE_MODULE(streams, streams_mod, SI_SUB_DRIVERS, SI_ORDER_ANY);
178
MODULE_VERSION(streams, 1);
178
MODULE_VERSION(streams, 1);
179
MODULE_DEPEND(streams, svr4elf, 1, 1, 1);
179
180
180
/*
181
/*
181
 * We only need open() and close() routines.  open() calls socreate()
182
 * We only need open() and close() routines.  open() calls socreate()
Lines 329-347 Link Here
329
}
330
}
330
331
331
332
332
struct svr4_strm *
333
svr4_stream_get(fp)
334
	struct file *fp;
335
{
336
	struct socket *so;
337
338
	if (fp == NULL || fp->f_type != DTYPE_SOCKET)
339
		return NULL;
340
341
	so = fp->f_data;
342
	return so->so_emuldata;
343
}
344
345
static int
333
static int
346
svr4_soo_close(struct file *fp, struct thread *td)
334
svr4_soo_close(struct file *fp, struct thread *td)
347
{
335
{
(-)sys/compat/svr4/svr4_socket.c (+14 lines)
Lines 66-71 Link Here
66
#include <compat/svr4/svr4_signal.h>
66
#include <compat/svr4/svr4_signal.h>
67
#include <compat/svr4/svr4_sockmod.h>
67
#include <compat/svr4/svr4_sockmod.h>
68
#include <compat/svr4/svr4_proto.h>
68
#include <compat/svr4/svr4_proto.h>
69
#include <compat/svr4/svr4_stropts.h>
69
70
70
struct svr4_sockcache_entry {
71
struct svr4_sockcache_entry {
71
	struct proc *p;		/* Process for the socket		*/
72
	struct proc *p;		/* Process for the socket		*/
Lines 168-173 Link Here
168
	mtx_unlock(&svr4_sockcache_lock);
169
	mtx_unlock(&svr4_sockcache_lock);
169
}
170
}
170
171
172
struct svr4_strm *
173
svr4_stream_get(fp)
174
	struct file *fp;
175
{
176
	struct socket *so;
177
178
	if (fp == NULL || fp->f_type != DTYPE_SOCKET)
179
		return NULL;
180
181
	so = fp->f_data;
182
	return so->so_emuldata;
183
}
184
171
void
185
void
172
svr4_purge_sockcache(arg, p)
186
svr4_purge_sockcache(arg, p)
173
	void *arg;
187
	void *arg;
(-)sys/compat/svr4/svr4_sysvec.c (-1 / +1 lines)
Lines 313-316 Link Here
313
	0
313
	0
314
};
314
};
315
DECLARE_MODULE_TIED(svr4elf, svr4_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY);
315
DECLARE_MODULE_TIED(svr4elf, svr4_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY);
316
MODULE_DEPEND(svr4elf, streams, 1, 1, 1);
316
MODULE_VERSION(svr4elf, 1);

Return to bug 208464