Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jan 1998 09:50:02 -0800 (PST)
From:      Cy Schubert <cys@wlc.com>
To:        freebsd-bugs
Subject:   Re: kern/3685: panic: fdesc attr
Message-ID:  <199801021750.JAA18760@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/3685; it has been noted by GNATS.

From: Cy Schubert <cys@wlc.com>
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."
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801021750.JAA18760>