Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs/fdesc Treat pipes like sockets and don't do setat...



details:   https://anonhg.NetBSD.org/src/rev/1d1f2f54909f
branches:  trunk
changeset: 524919:1d1f2f54909f
user:      jmc <jmc%NetBSD.org@localhost>
date:      Tue Apr 02 10:34:54 2002 +0000

description:
Treat pipes like sockets and don't do setattr on them

diffstat:

 sys/miscfs/fdesc/fdesc_vnops.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r e9f81dce3f14 -r 1d1f2f54909f sys/miscfs/fdesc/fdesc_vnops.c
--- a/sys/miscfs/fdesc/fdesc_vnops.c    Tue Apr 02 10:25:21 2002 +0000
+++ b/sys/miscfs/fdesc/fdesc_vnops.c    Tue Apr 02 10:34:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdesc_vnops.c,v 1.67 2001/12/06 04:27:41 chs Exp $     */
+/*     $NetBSD: fdesc_vnops.c,v 1.68 2002/04/02 10:34:54 jmc Exp $     */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.67 2001/12/06 04:27:41 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.68 2002/04/02 10:34:54 jmc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -644,11 +644,14 @@
                return (EBADF);
 
        /*
-        * Can setattr the underlying vnode, but not sockets!
+        * XXX: Can't reasonably set the attr's on any types currently.
+        *      On vnode's this will cause truncation and socket/pipes make
+        *      no sense.
         */
        switch (fp->f_type) {
        case DTYPE_VNODE:
        case DTYPE_SOCKET:
+       case DTYPE_PIPE:
                error = 0;
                break;
 



Home | Main Index | Thread Index | Old Index