=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/fstat/fstat.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- src/usr.bin/fstat/fstat.c 1998/09/07 01:04:13 1.19 +++ src/usr.bin/fstat/fstat.c 1998/09/08 20:49:33 1.20 @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.19 1998/09/07 01:04:13 art Exp $ */ +/* $OpenBSD: fstat.c,v 1.20 1998/09/08 20:49:33 art Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -41,7 +41,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: fstat.c,v 1.19 1998/09/07 01:04:13 art Exp $"; +static char *rcsid = "$OpenBSD: fstat.c,v 1.20 1998/09/08 20:49:33 art Exp $"; #endif /* not lint */ #include @@ -80,8 +80,6 @@ #include -#include - #include #include #include @@ -146,7 +144,6 @@ void usage __P((void)); void vtrans __P((struct vnode *, int, int)); int getfname __P((char *)); -void pipetrans __P((struct pipe *, int)); int main(argc, argv) @@ -353,10 +350,8 @@ else if (file.f_type == DTYPE_SOCKET) { if (checkfile == 0) socktrans((struct socket *)file.f_data, i); - } else if (file.f_type == DTYPE_PIPE) { - if (checkfile == 0) - pipetrans((struct pipe *)file.f_data, i); - } else { + } + else { dprintf("unknown file type %d for file %d of pid %d", file.f_type, i, Pid); } @@ -628,43 +623,6 @@ mt->next = mhead; mhead = mt; return (mt->mntonname); -} - -void -pipetrans(pipe, i) - struct pipe *pipe; - int i; -{ - struct pipe pi; - void *maxaddr; - - PREFIX(i); - - printf(" "); - - /* fill in socket */ - if (!KVM_READ(pipe, &pi, sizeof(struct pipe))) { - dprintf("can't read pipe at %p", pipe); - goto bad; - } - - /* - * We don't have enough space to fit both peer and own address, so - * we select the higher address so both ends of the pipe have the - * same visible addr. (it's the higher address because when the other - * end closes, it becomes 0) - */ - maxaddr = MAX(pipe, pi.pipe_peer); - - printf("pipe %p state: %s%s%s", maxaddr, - (pi.pipe_state & PIPE_WANTR) ? "R" : "", - (pi.pipe_state & PIPE_WANTW) ? "W" : "", - (pi.pipe_state & PIPE_EOF) ? "E" : ""); - - printf("\n"); - return; -bad: - printf("* error\n"); } void