summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-14 11:04:06 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-14 11:04:06 +0000
commit1d14ab3ff6a554ad76514dd6ab7007fcdb478a37 (patch)
tree76d737949c1c790e542a3ed44450aa6761e6d777
parent71f76dd0db566ca751d290bf40f5babf7ebbf9d9 (diff)
More generic arguments to soo_stat.
-rw-r--r--sys/compat/common/vfs_syscalls_43.c4
-rw-r--r--sys/compat/netbsd/netbsd_stat.c4
-rw-r--r--sys/compat/osf1/osf1_descrip.c4
-rw-r--r--sys/kern/kern_descrip.c4
-rw-r--r--sys/kern/sys_socket.c10
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c4
-rw-r--r--sys/sys/socketvar.h4
7 files changed, 18 insertions, 16 deletions
diff --git a/sys/compat/common/vfs_syscalls_43.c b/sys/compat/common/vfs_syscalls_43.c
index 5dafe897634..466dfb3d3cc 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.11 2001/05/14 10:51:26 art Exp $ */
+/* $OpenBSD: vfs_syscalls_43.c,v 1.12 2001/05/14 11:04:04 art Exp $ */
/* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */
/*
@@ -206,7 +206,7 @@ compat_43_sys_fstat(p, v, retval)
break;
case DTYPE_SOCKET:
- error = soo_stat((struct socket *)fp->f_data, &ub);
+ error = soo_stat(fp, &ub, p);
break;
#ifndef OLD_PIPE
diff --git a/sys/compat/netbsd/netbsd_stat.c b/sys/compat/netbsd/netbsd_stat.c
index 4504e80ba2d..18f7008d09c 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.6 2001/05/14 10:51:27 art Exp $ */
+/* $OpenBSD: netbsd_stat.c,v 1.7 2001/05/14 11:04:05 art Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -202,7 +202,7 @@ netbsd_sys___fstat13(p, v, retval)
break;
case DTYPE_SOCKET:
- error = soo_stat((struct socket *)fp->f_data, &sb);
+ error = soo_stat(fp, &sb, p);
break;
#ifndef OLD_PIPE
diff --git a/sys/compat/osf1/osf1_descrip.c b/sys/compat/osf1/osf1_descrip.c
index 046f2a52522..28af892eb87 100644
--- a/sys/compat/osf1/osf1_descrip.c
+++ b/sys/compat/osf1/osf1_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osf1_descrip.c,v 1.3 2001/05/14 11:00:23 art Exp $ */
+/* $OpenBSD: osf1_descrip.c,v 1.4 2001/05/14 11:04:05 art Exp $ */
/* $NetBSD: osf1_descrip.c,v 1.5 1999/06/26 01:24:41 cgd Exp $ */
/*
@@ -256,7 +256,7 @@ osf1_sys_fstat(p, v, retval)
break;
case DTYPE_SOCKET:
- error = soo_stat((struct socket *)fp->f_data, &ub);
+ error = soo_stat(fp, &ub, p);
break;
#ifndef OLD_PIPE
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index adf489456ea..ceac7e51684 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.24 2001/05/14 10:51:26 art Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.25 2001/05/14 11:04:04 art Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -520,7 +520,7 @@ sys_fstat(p, v, retval)
break;
case DTYPE_SOCKET:
- error = soo_stat((struct socket *)fp->f_data, &ub);
+ error = soo_stat(fp, &ub, p);
break;
#ifndef OLD_PIPE
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c
index 1d51c9349fa..e90ca720c5e 100644
--- a/sys/kern/sys_socket.c
+++ b/sys/kern/sys_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_socket.c,v 1.5 2001/03/01 20:54:34 provos Exp $ */
+/* $OpenBSD: sys_socket.c,v 1.6 2001/05/14 11:04:04 art Exp $ */
/* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */
/*
@@ -185,10 +185,12 @@ soo_select(fp, which, p)
}
int
-soo_stat(so, ub)
- register struct socket *so;
- register struct stat *ub;
+soo_stat(fp, ub, p)
+ struct file *fp;
+ struct stat *ub;
+ struct proc *p;
{
+ struct socket *so = (struct socket *)fp->f_data;
bzero((caddr_t)ub, sizeof (*ub));
ub->st_mode = S_IFSOCK;
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c
index 7d1877f2a79..0bb6d1acb90 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.17 2001/05/14 10:51:27 art Exp $ */
+/* $OpenBSD: fdesc_vnops.c,v 1.18 2001/05/14 11:04:05 art Exp $ */
/* $NetBSD: fdesc_vnops.c,v 1.32 1996/04/11 11:24:29 mrg Exp $ */
/*
@@ -466,7 +466,7 @@ fdesc_attr(fd, vap, cred, p)
break;
case DTYPE_SOCKET:
- error = soo_stat((struct socket *)fp->f_data, &stb);
+ error = soo_stat(fp, &stb, p);
if (error == 0) {
vattr_null(vap);
vap->va_type = VSOCK;
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index 33b550b8a73..a93a07ad151 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: socketvar.h,v 1.20 2001/03/01 20:54:35 provos Exp $ */
+/* $OpenBSD: socketvar.h,v 1.21 2001/05/14 11:04:03 art Exp $ */
/* $NetBSD: socketvar.h,v 1.18 1996/02/09 18:25:38 christos Exp $ */
/*-
@@ -229,7 +229,7 @@ int soo_ioctl __P((struct file *fp, u_long cmd, caddr_t data,
int soo_select __P((struct file *fp, int which, struct proc *p));
int soo_kqfilter __P((struct file *fp, struct knote *kn));
int soo_close __P((struct file *fp, struct proc *p));
-int soo_stat __P((struct socket *, struct stat *));
+int soo_stat __P((struct file *, struct stat *, struct proc *));
int uipc_usrreq __P((struct socket *, int , struct mbuf *,
struct mbuf *, struct mbuf *));
void sbappend __P((struct sockbuf *sb, struct mbuf *m));