diff options
author | peter <peter@FreeBSD.org> | 1999-11-08 03:28:49 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-11-08 03:28:49 +0000 |
commit | 1a4a3558e504ad97460718691f07aa75332defc7 (patch) | |
tree | 9fbfe09e09ab91c0f40bbfbd620d53918d257ec4 /sys/kern/sys_pipe.c | |
parent | 3dd33a3e0f26ff05eb6d05ab539d40228ef676e5 (diff) | |
download | FreeBSD-src-1a4a3558e504ad97460718691f07aa75332defc7.zip FreeBSD-src-1a4a3558e504ad97460718691f07aa75332defc7.tar.gz |
Update pipe code for fo_stat() entry point - pipe_stat() is now no longer
used outside the pipe code.
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r-- | sys/kern/sys_pipe.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index de73bf9..95f5140 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -93,10 +93,11 @@ static int pipe_write __P((struct file *fp, struct uio *uio, static int pipe_close __P((struct file *fp, struct proc *p)); static int pipe_poll __P((struct file *fp, int events, struct ucred *cred, struct proc *p)); +static int pipe_stat __P((struct file *fp, struct stat *sb, struct proc *p)); static int pipe_ioctl __P((struct file *fp, u_long cmd, caddr_t data, struct proc *p)); static struct fileops pipeops = - { pipe_read, pipe_write, pipe_ioctl, pipe_poll, pipe_close }; + { pipe_read, pipe_write, pipe_ioctl, pipe_poll, pipe_stat, pipe_close }; /* * Default pipe buffer size(s), this can be kind-of large now because pipe @@ -1010,11 +1011,14 @@ pipe_poll(fp, events, cred, p) return (revents); } -int -pipe_stat(pipe, ub) - register struct pipe *pipe; - register struct stat *ub; +static int +pipe_stat(fp, ub, p) + struct file *fp; + struct stat *ub; + struct proc *p; { + struct pipe *pipe = (struct pipe *)fp->f_data; + bzero((caddr_t)ub, sizeof (*ub)); ub->st_mode = S_IFIFO; ub->st_blksize = pipe->pipe_buffer.size; |