backout change that made pr_stat return EOPNOTSUPP for protocols that
were not filling in struct stat. decision made after further discussion with rmind and investigation of how other operating systems behave. soo_stat() is doing just enough to be able to call what gets returned valid and thus justifys a return of success. additional review will be done to determine of the pr_stat functions that were already returning EOPNOTSUPP can be considered successful with what soo_stat() is doing.
This commit is contained in:
parent
890c61ca39
commit
909a1fc699
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rtsock.c,v 1.151 2014/07/07 10:18:20 rtr Exp $ */
|
||||
/* $NetBSD: rtsock.c,v 1.152 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.151 2014/07/07 10:18:20 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.152 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
|
@ -233,7 +233,7 @@ COMPATNAME(route_ioctl)(struct socket *so, u_long cmd, void *nam,
|
|||
static int
|
||||
COMPATNAME(route_stat)(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ddp_usrreq.c,v 1.49 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: ddp_usrreq.c,v 1.50 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990,1991 Regents of The University of Michigan.
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.49 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.50 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include "opt_mbuftrace.h"
|
||||
|
||||
|
@ -481,7 +481,8 @@ ddp_ioctl(struct socket *so, u_long cmd, void *addr, struct ifnet *ifp)
|
|||
static int
|
||||
ddp_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
/* stat: don't bother with a blocksize. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hci_socket.c,v 1.28 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: hci_socket.c,v 1.29 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 Iain Hibbert.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.28 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.29 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
/* load symbolic names */
|
||||
#ifdef BLUETOOTH_DEBUG
|
||||
|
@ -496,7 +496,7 @@ hci_ioctl(struct socket *up, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
hci_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: l2cap_socket.c,v 1.19 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: l2cap_socket.c,v 1.20 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 Iain Hibbert.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.19 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.20 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
/* load symbolic names */
|
||||
#ifdef BLUETOOTH_DEBUG
|
||||
|
@ -125,7 +125,7 @@ l2cap_ioctl(struct socket *up, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
l2cap_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rfcomm_socket.c,v 1.20 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: rfcomm_socket.c,v 1.21 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.20 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.21 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
/* load symbolic names */
|
||||
#ifdef BLUETOOTH_DEBUG
|
||||
|
@ -133,7 +133,7 @@ rfcomm_ioctl(struct socket *up, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
rfcomm_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sco_socket.c,v 1.21 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: sco_socket.c,v 1.22 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.21 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.22 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
/* load symbolic names */
|
||||
#ifdef BLUETOOTH_DEBUG
|
||||
|
@ -116,7 +116,7 @@ sco_ioctl(struct socket *up, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
sco_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: raw_ip.c,v 1.129 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: raw_ip.c,v 1.130 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -65,7 +65,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.129 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.130 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -575,7 +575,8 @@ rip_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
rip_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
/* stat: don't bother with a blocksize. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_usrreq.c,v 1.182 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: tcp_usrreq.c,v 1.183 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -99,7 +99,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.182 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.183 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ipsec.h"
|
||||
|
@ -956,7 +956,8 @@ tcp_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
tcp_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
/* stat: don't bother with a blocksize. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: udp_usrreq.c,v 1.204 2014/07/07 07:09:58 rtr Exp $ */
|
||||
/* $NetBSD: udp_usrreq.c,v 1.205 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -66,7 +66,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.204 2014/07/07 07:09:58 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.205 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -903,7 +903,8 @@ udp_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
udp_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
/* stat: don't bother with a blocksize. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: raw_ip6.c,v 1.123 2014/07/07 07:09:59 rtr Exp $ */
|
||||
/* $NetBSD: raw_ip6.c,v 1.124 2014/07/07 15:13:21 rtr Exp $ */
|
||||
/* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -62,7 +62,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.123 2014/07/07 07:09:59 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.124 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include "opt_ipsec.h"
|
||||
|
||||
|
@ -653,7 +653,8 @@ rip6_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
rip6_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
/* stat: don't bother with a blocksize */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: udp6_usrreq.c,v 1.103 2014/07/07 07:09:59 rtr Exp $ */
|
||||
/* $NetBSD: udp6_usrreq.c,v 1.104 2014/07/07 15:13:21 rtr Exp $ */
|
||||
/* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -62,7 +62,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.103 2014/07/07 07:09:59 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.104 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet_csum.h"
|
||||
|
@ -696,7 +696,8 @@ udp6_ioctl(struct socket *so, u_long cmd, void *addr6, struct ifnet *ifp)
|
|||
static int
|
||||
udp6_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
/* stat: don't bother with a blocksize */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: keysock.c,v 1.31 2014/07/07 07:09:59 rtr Exp $ */
|
||||
/* $NetBSD: keysock.c,v 1.32 2014/07/07 15:13:21 rtr Exp $ */
|
||||
/* $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */
|
||||
/* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.31 2014/07/07 07:09:59 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.32 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include "opt_ipsec.h"
|
||||
|
||||
|
@ -493,7 +493,7 @@ key_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
key_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: natm.c,v 1.33 2014/07/07 07:09:59 rtr Exp $ */
|
||||
/* $NetBSD: natm.c,v 1.34 2014/07/07 15:13:21 rtr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Charles D. Cranor and Washington University.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.33 2014/07/07 07:09:59 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.34 2014/07/07 15:13:21 rtr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kmem.h>
|
||||
|
@ -140,7 +140,7 @@ done:
|
|||
static int
|
||||
natm_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sockin.c,v 1.44 2014/07/07 07:09:59 rtr Exp $ */
|
||||
/* $NetBSD: sockin.c,v 1.45 2014/07/07 15:13:22 rtr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, 2009 Antti Kantee. All Rights Reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.44 2014/07/07 07:09:59 rtr Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.45 2014/07/07 15:13:22 rtr Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/condvar.h>
|
||||
|
@ -462,7 +462,7 @@ sockin_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)
|
|||
static int
|
||||
sockin_stat(struct socket *so, struct stat *ub)
|
||||
{
|
||||
return EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue