summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-14 10:51:28 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-14 10:51:28 +0000
commit79a7474f3a12e31e9c0d6d36e0bbd46918bdff21 (patch)
tree1d65b40721e1dd9578bfae1aa493d0ee47989fe3 /sys/kern
parentb296e0990d987b38fe241c1b0f52cd3f04a94d72 (diff)
More generic arguments to pipe_stat.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_descrip.c8
-rw-r--r--sys/kern/sys_pipe.c9
2 files changed, 10 insertions, 7 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index d1ef891fbb1..adf489456ea 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.23 2000/11/16 20:02:16 provos Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.24 2001/05/14 10:51:26 art Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -505,8 +505,8 @@ sys_fstat(p, v, retval)
syscallarg(struct stat *) sb;
} */ *uap = v;
int fd = SCARG(uap, fd);
- register struct filedesc *fdp = p->p_fd;
- register struct file *fp;
+ struct filedesc *fdp = p->p_fd;
+ struct file *fp;
struct stat ub;
int error;
@@ -525,7 +525,7 @@ sys_fstat(p, v, retval)
#ifndef OLD_PIPE
case DTYPE_PIPE:
- error = pipe_stat((struct pipe *)fp->f_data, &ub);
+ error = pipe_stat(fp, &ub, p);
break;
#endif
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 4c4574522a5..e687f3e850f 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_pipe.c,v 1.27 2001/05/14 10:35:42 art Exp $ */
+/* $OpenBSD: sys_pipe.c,v 1.28 2001/05/14 10:51:26 art Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@@ -671,10 +671,13 @@ pipe_select(fp, which, p)
}
int
-pipe_stat(pipe, ub)
- struct pipe *pipe;
+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;