summaryrefslogtreecommitdiffstats
path: root/sys/dev/streams
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
committerdillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
commitddf9ef103e0a611c9a01425a28baf8a612b0d114 (patch)
tree19da0d56c468b8e0f6d0361d7d39157f561aa69f /sys/dev/streams
parent07cbccc353d7afbe8948b6025965ca36739d7373 (diff)
downloadFreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.zip
FreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.tar.gz
Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
Diffstat (limited to 'sys/dev/streams')
-rw-r--r--sys/dev/streams/streams.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index e1f4ae8..039930e 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -274,7 +274,7 @@ streamsopen(dev_t dev, int oflags, int devtype, struct thread *td)
}
FILEDESC_LOCK(p->p_fd);
- fp->f_data = (caddr_t)so;
+ fp->un_data.socket = so;
fp->f_flag = FREAD|FWRITE;
fp->f_ops = &svr4_netops;
fp->f_type = DTYPE_SOCKET;
@@ -357,7 +357,7 @@ svr4_stream_get(fp)
if (fp == NULL || fp->f_type != DTYPE_SOCKET)
return NULL;
- so = (struct socket *) fp->f_data;
+ so = fp->un_data.socket;
/*
* mpfixme: lock socketbuffer here
@@ -395,7 +395,7 @@ svr4_delete_socket(p, fp)
struct file *fp;
{
struct svr4_sockcache_entry *e;
- void *cookie = ((struct socket *) fp->f_data)->so_emuldata;
+ void *cookie = fp->un_data.socket->so_emuldata;
while (svr4_str_initialized != 2) {
if (atomic_cmpset_acq_int(&svr4_str_initialized, 0, 1)) {
@@ -418,7 +418,7 @@ svr4_delete_socket(p, fp)
static int
svr4_soo_close(struct file *fp, struct thread *td)
{
- struct socket *so = (struct socket *)fp->f_data;
+ struct socket *so = fp->un_data.socket;
/* CHECKUNIT_DIAG(ENXIO);*/
OpenPOWER on IntegriCloud