summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/common/vfs_syscalls_43.c4
-rw-r--r--sys/compat/netbsd/netbsd_stat.c4
-rw-r--r--sys/kern/kern_descrip.c8
-rw-r--r--sys/kern/sys_pipe.c9
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c4
-rw-r--r--sys/sys/pipe.h4
6 files changed, 18 insertions, 15 deletions
diff --git a/sys/compat/common/vfs_syscalls_43.c b/sys/compat/common/vfs_syscalls_43.c
index 83796580c6b..5dafe897634 100644
--- a/sys/compat/common/vfs_syscalls_43.c
+++ b/sys/compat/common/vfs_syscalls_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls_43.c,v 1.10 2001/01/23 07:06:23 csapuntz Exp $ */
+/* $OpenBSD: vfs_syscalls_43.c,v 1.11 2001/05/14 10:51:26 art Exp $ */
/* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */
/*
@@ -211,7 +211,7 @@ compat_43_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/compat/netbsd/netbsd_stat.c b/sys/compat/netbsd/netbsd_stat.c
index 97fd12b848f..4504e80ba2d 100644
--- a/sys/compat/netbsd/netbsd_stat.c
+++ b/sys/compat/netbsd/netbsd_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_stat.c,v 1.5 1999/09/22 01:35:01 kstailey Exp $ */
+/* $OpenBSD: netbsd_stat.c,v 1.6 2001/05/14 10:51:27 art Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -207,7 +207,7 @@ netbsd_sys___fstat13(p, v, retval)
#ifndef OLD_PIPE
case DTYPE_PIPE:
- error = pipe_stat((struct pipe *)fp->f_data, &sb);
+ error = pipe_stat(fp, &sb, p);
break;
#endif
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;
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c
index a9d07c7f72e..7d1877f2a79 100644
--- a/sys/miscfs/fdesc/fdesc_vnops.c
+++ b/sys/miscfs/fdesc/fdesc_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdesc_vnops.c,v 1.16 1999/10/13 06:32:23 art Exp $ */
+/* $OpenBSD: fdesc_vnops.c,v 1.17 2001/05/14 10:51:27 art Exp $ */
/* $NetBSD: fdesc_vnops.c,v 1.32 1996/04/11 11:24:29 mrg Exp $ */
/*
@@ -492,7 +492,7 @@ fdesc_attr(fd, vap, cred, p)
#ifdef OLD_PIPE
error = 0;
#else
- error = pipe_stat((struct pipe *)fp->f_data, &stb);
+ error = pipe_stat(fp, &stb, p);
if (error == 0) {
vattr_null(vap);
vap->va_type = VFIFO;
diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h
index b598544fe01..de6f0e23ebc 100644
--- a/sys/sys/pipe.h
+++ b/sys/sys/pipe.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipe.h,v 1.4 1999/10/29 14:01:44 art Exp $ */
+/* $OpenBSD: pipe.h,v 1.5 2001/05/14 10:51:25 art Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@@ -87,7 +87,7 @@ struct pipe {
};
#ifdef _KERNEL
-int pipe_stat __P((struct pipe *pipe, struct stat *ub));
+int pipe_stat __P((struct file *fp, struct stat *ub, struct proc *p));
#endif /* _KERNEL */
#endif /* !OLD_PIPE */