Date: Wed, 28 Jun 2000 10:47:58 -0700 From: Alfred Perlstein <alfred@FreeBSD.org> To: Chris Costello <chris@calldei.com> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/miscfs/fdesc fdesc_vnops.c Message-ID: <20000628104758.Y275@fw.wintelcom.net> In-Reply-To: <20000627223423.H20702@holly.calldei.com>; from chris@calldei.com on Tue, Jun 27, 2000 at 10:34:24PM -0500 References: <200006272246.PAA76896@freefall.freebsd.org> <20000627223423.H20702@holly.calldei.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Chris Costello <chris@calldei.com> [000627 20:41] wrote: > On Tuesday, June 27, 2000, Alfred Perlstein wrote: > > alfred 2000/06/27 15:46:36 PDT > > > > Modified files: > > sys/miscfs/fdesc fdesc_vnops.c > > Log: > > by changing the logic here we can support dynamic additions of new > > filetypes. > > + > + default: > error = fo_stat(fp, &stb, ap->a_p); > if (error == 0) { > VATTR_NULL(vap); > - if (fp->f_type == DTYPE_KQUEUE) > + /* XXX Fake it! */ > + if (fp->f_type != DTYPE_PIPE && fp->f_type != DTYPE_SOCKET) > vap->va_type = VFIFO; > > This has bad style (way past 80 columns) and it just does not > make sense. This doesn't make it any easier to add new file > types, and you're just hiding the DTYPE_KQUEUE, DTYPE_PIPE and > DTYPE_SOCKET cases inside a default: handler. Are all new file > types going to be FIFOs? > > What you should really do is ensure that any new file type > returns proper stat information. I'm tempted to say that ones > that don't should be treated as VNON, rather than VFIFO, from a > design perspective. so basically change: vap->va_type = VFIFO; to: vap->va_type = VNON; and fix the long line? -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000628104758.Y275>