diff options
author | peter <peter@FreeBSD.org> | 1996-01-30 12:23:17 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-01-30 12:23:17 +0000 |
commit | ed8a6cec36d5a133d2c4419aeb20ac9e162e9ab5 (patch) | |
tree | 72d347334df6c102f854ef8a34b8a4b50c6f41c9 /sys | |
parent | 757048e121f077a2e481e0c3d1710728682372d5 (diff) | |
download | FreeBSD-src-ed8a6cec36d5a133d2c4419aeb20ac9e162e9ab5.zip FreeBSD-src-ed8a6cec36d5a133d2c4419aeb20ac9e162e9ab5.tar.gz |
Call pipe_stat() when presented with a DTYPE_PIPE file in the linux
fstat() syscall, rather than panic("linux newfstat").
(Note: I've extracted this from a larger set of diffs, I'm confident I've
not missed any dependencies but can't modload it to test it on my system)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linux/linux_stats.c | 6 | ||||
-rw-r--r-- | sys/i386/linux/linux_stats.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 8756f09..327343b 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_stats.c,v 1.2 1995/08/28 09:18:38 julian Exp $ + * $Id: linux_stats.c,v 1.3 1995/11/22 07:43:51 bde Exp $ */ #include <sys/param.h> @@ -39,6 +39,7 @@ #include <sys/socketvar.h> #include <sys/stat.h> #include <sys/vnode.h> +#include <sys/pipe.h> #include <i386/linux/linux.h> #include <i386/linux/sysproto.h> @@ -163,6 +164,9 @@ linux_newfstat(struct proc *p, struct linux_newfstat_args *args, int *retval) case DTYPE_SOCKET: error = soo_stat((struct socket *)fp->f_data, &buf); break; + case DTYPE_PIPE: + error = pipe_stat((struct pipe *)fp->f_data, &buf); + break; default: panic("LINUX newfstat"); } diff --git a/sys/i386/linux/linux_stats.c b/sys/i386/linux/linux_stats.c index 8756f09..327343b 100644 --- a/sys/i386/linux/linux_stats.c +++ b/sys/i386/linux/linux_stats.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_stats.c,v 1.2 1995/08/28 09:18:38 julian Exp $ + * $Id: linux_stats.c,v 1.3 1995/11/22 07:43:51 bde Exp $ */ #include <sys/param.h> @@ -39,6 +39,7 @@ #include <sys/socketvar.h> #include <sys/stat.h> #include <sys/vnode.h> +#include <sys/pipe.h> #include <i386/linux/linux.h> #include <i386/linux/sysproto.h> @@ -163,6 +164,9 @@ linux_newfstat(struct proc *p, struct linux_newfstat_args *args, int *retval) case DTYPE_SOCKET: error = soo_stat((struct socket *)fp->f_data, &buf); break; + case DTYPE_PIPE: + error = pipe_stat((struct pipe *)fp->f_data, &buf); + break; default: panic("LINUX newfstat"); } |