1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

Update socket file type for fo_stat(). soo_stat() becomes a fileops

switch entry point rather than being used externally with knowledge of the
internals of the DTYPE_SOCKET f_data contents.
This commit is contained in:
Peter Wemm 1999-11-08 03:31:01 +00:00
parent 29e040e5c1
commit 0ba80ba6a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52984
2 changed files with 7 additions and 5 deletions

View File

@ -50,7 +50,7 @@
#include <net/route.h>
struct fileops socketops =
{ soo_read, soo_write, soo_ioctl, soo_poll, soo_close };
{ soo_read, soo_write, soo_ioctl, soo_poll, soo_stat, soo_close };
/* ARGSUSED */
int
@ -155,10 +155,12 @@ soo_poll(fp, events, cred, 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;

View File

@ -296,7 +296,7 @@ int soo_ioctl __P((struct file *fp, u_long cmd, caddr_t data,
struct proc *p));
int soo_poll __P((struct file *fp, int events, struct ucred *cred,
struct proc *p));
int soo_stat __P((struct socket *so, struct stat *ub));
int soo_stat __P((struct file *fp, struct stat *ub, struct proc *p));
/*
* From uipc_socket and friends