summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_pipe.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2003-01-13 00:33:17 +0000
committerdillon <dillon@FreeBSD.org>2003-01-13 00:33:17 +0000
commitccd5574cc6e61b8fbf6b5ed907375f42e19b54f8 (patch)
treeee3c8690226ac4a086122b794c975aab9319b671 /sys/kern/sys_pipe.c
parentfe540b81bb4ea3115544cd0f082b4ecd39cebb62 (diff)
downloadFreeBSD-src-ccd5574cc6e61b8fbf6b5ed907375f42e19b54f8.zip
FreeBSD-src-ccd5574cc6e61b8fbf6b5ed907375f42e19b54f8.tar.gz
Bow to the whining masses and change a union back into void *. Retain
removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it.
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r--sys/kern/sys_pipe.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 84ce363..915ee3e 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -238,7 +238,7 @@ pipe(td, uap)
FILE_LOCK(rf);
rf->f_flag = FREAD | FWRITE;
rf->f_type = DTYPE_PIPE;
- rf->un_data.pipe = rpipe;
+ rf->f_data = rpipe;
rf->f_ops = &pipeops;
FILE_UNLOCK(rf);
error = falloc(td, &wf, &fd);
@@ -259,7 +259,7 @@ pipe(td, uap)
FILE_LOCK(wf);
wf->f_flag = FREAD | FWRITE;
wf->f_type = DTYPE_PIPE;
- wf->un_data.pipe = wpipe;
+ wf->f_data = wpipe;
wf->f_ops = &pipeops;
FILE_UNLOCK(wf);
td->td_retval[1] = fd;
@@ -452,7 +452,7 @@ pipe_read(fp, uio, active_cred, flags, td)
struct thread *td;
int flags;
{
- struct pipe *rpipe = fp->un_data.pipe;
+ struct pipe *rpipe = fp->f_data;
int error;
int nread = 0;
u_int size;
@@ -868,7 +868,7 @@ pipe_write(fp, uio, active_cred, flags, td)
int orig_resid;
struct pipe *wpipe, *rpipe;
- rpipe = fp->un_data.pipe;
+ rpipe = fp->f_data;
wpipe = rpipe->pipe_peer;
PIPE_LOCK(rpipe);
@@ -1155,7 +1155,7 @@ pipe_ioctl(fp, cmd, data, active_cred, td)
struct ucred *active_cred;
struct thread *td;
{
- struct pipe *mpipe = fp->un_data.pipe;
+ struct pipe *mpipe = fp->f_data;
#ifdef MAC
int error;
#endif
@@ -1223,7 +1223,7 @@ pipe_poll(fp, events, active_cred, td)
struct ucred *active_cred;
struct thread *td;
{
- struct pipe *rpipe = fp->un_data.pipe;
+ struct pipe *rpipe = fp->f_data;
struct pipe *wpipe;
int revents = 0;
#ifdef MAC
@@ -1284,7 +1284,7 @@ pipe_stat(fp, ub, active_cred, td)
struct ucred *active_cred;
struct thread *td;
{
- struct pipe *pipe = fp->un_data.pipe;
+ struct pipe *pipe = fp->f_data;
#ifdef MAC
int error;
@@ -1317,10 +1317,10 @@ pipe_close(fp, td)
struct file *fp;
struct thread *td;
{
- struct pipe *cpipe = fp->un_data.pipe;
+ struct pipe *cpipe = fp->f_data;
fp->f_ops = &badfileops;
- fp->un_data.pipe = NULL;
+ fp->f_data = NULL;
funsetown(&cpipe->pipe_sigio);
pipeclose(cpipe);
return (0);
@@ -1428,7 +1428,7 @@ pipe_kqfilter(struct file *fp, struct knote *kn)
{
struct pipe *cpipe;
- cpipe = kn->kn_fp->un_data.pipe;
+ cpipe = kn->kn_fp->f_data;
switch (kn->kn_filter) {
case EVFILT_READ:
kn->kn_fop = &pipe_rfiltops;
@@ -1465,7 +1465,7 @@ filt_pipedetach(struct knote *kn)
static int
filt_piperead(struct knote *kn, long hint)
{
- struct pipe *rpipe = kn->kn_fp->un_data.pipe;
+ struct pipe *rpipe = kn->kn_fp->f_data;
struct pipe *wpipe = rpipe->pipe_peer;
PIPE_LOCK(rpipe);
@@ -1487,7 +1487,7 @@ filt_piperead(struct knote *kn, long hint)
static int
filt_pipewrite(struct knote *kn, long hint)
{
- struct pipe *rpipe = kn->kn_fp->un_data.pipe;
+ struct pipe *rpipe = kn->kn_fp->f_data;
struct pipe *wpipe = rpipe->pipe_peer;
PIPE_LOCK(rpipe);
OpenPOWER on IntegriCloud