From owner-freebsd-bugs Fri Jan 2 09:50:06 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA18766 for bugs-outgoing; Fri, 2 Jan 1998 09:50:06 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA18760; Fri, 2 Jan 1998 09:50:02 -0800 (PST) (envelope-from gnats) Date: Fri, 2 Jan 1998 09:50:02 -0800 (PST) Message-Id: <199801021750.JAA18760@hub.freebsd.org> To: freebsd-bugs Cc: From: Cy Schubert Subject: Re: kern/3685: panic: fdesc attr Reply-To: Cy Schubert Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/3685; it has been noted by GNATS. From: Cy Schubert To: freebsd-gnats-submit@freebsd.org, cschuber@uumail.gov.bc.ca, cy@uumail.gov.bc.ca Cc: Subject: Re: kern/3685: panic: fdesc attr Date: Fri, 02 Jan 1998 09:41:10 -0800 I finally had some time to look at this and here is a patch. The patch reports pipes (DTYPE_PIPE) as fifos (VFIFO). I think that this is acceptable because pipes which normally do not show up in a directory listing do show up in the fdesc filesystem (semantics of the fdesc filesystem are already slightly different from the normal semantics). --- sys/miscfs/fdesc/fdesc_vnops.c.orig Sat Dec 21 11:04:28 1996 +++ sys/miscfs/fdesc/fdesc_vnops.c Fri Jan 2 09:18:12 1998 @@ -409,11 +409,18 @@ } break; + case DTYPE_PIPE: case DTYPE_SOCKET: - error = soo_stat((struct socket *)fp->f_data, &stb); + if (fp->f_type == DTYPE_SOCKET) + error = soo_stat((struct socket *)fp->f_data, &stb); + else + error = pipe_stat((struct pipe *)fp->f_data, &stb); if (error == 0) { vattr_null(vap); - vap->va_type = VSOCK; + if (fp->f_type == DTYPE_SOCKET) + vap->va_type = VSOCK; + else + vap->va_type = VFIFO; vap->va_mode = stb.st_mode; vap->va_nlink = stb.st_nlink; vap->va_uid = stb.st_uid; @@ -557,6 +564,7 @@ error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap, ap->a_cred, ap->a_p); break; + case DTYPE_PIPE: case DTYPE_SOCKET: error = 0; break; Regards, Phone: (250)387-8437 Cy Schubert Fax: (250)387-5766 UNIX Support OV/VM: BCSC02(CSCHUBER) ITSD BITNET: CSCHUBER@BCSC02.BITNET Government of BC Internet: cschuber@uumail.gov.bc.ca Cy.Schubert@gems8.gov.bc.ca "Quit spooling around, JES do it."