From owner-freebsd-audit Fri Jun 15 5:20:45 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 355E037B40C for ; Fri, 15 Jun 2001 05:20:29 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 33569 invoked by uid 1000); 15 Jun 2001 12:19:06 -0000 Date: Fri, 15 Jun 2001 15:19:06 +0300 From: Peter Pentchev To: Dima Dorfman Cc: audit@FreeBSD.org Subject: Re: fstat(1) patches to recognize FIFO's Message-ID: <20010615151906.H94445@ringworld.oblivion.bg> Mail-Followup-To: Dima Dorfman , audit@FreeBSD.org References: <20010614134953.E837@ringworld.oblivion.bg> <20010614221129.A33673E28@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010614221129.A33673E28@bazooka.unixfreak.org>; from dima@unixfreak.org on Thu, Jun 14, 2001 at 03:11:29PM -0700 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jun 14, 2001 at 03:11:29PM -0700, Dima Dorfman wrote: [snip] > > Style bug. A second-level indent should be 4 spaces. Actually, this > file is screwed up in this respect; at a quick glance, it looks like > some of it uses 4 spaces, while some other parts indent to the opening > parenthesis like you did above. Since it's already inconsistent, I > think it's best to follow the current guideline, which is to indent 4 > spaces. > > Other than that, looks great! Objection noted. Here's an updated patch. Tab indents were only used in those two places in dofiles(), and it would be just my luck to blindly copy one of them and assume it to be the prevailing style for this file without checking :) And btw, no, I don't think it is worth it in this particular case to separate functionality and whitespace changes. Even the untrained eye can easily see that the first and third chunk are no-ops :) G'luck, Peter -- I am not the subject of this sentence. Index: src/usr.bin/fstat/fstat.c =================================================================== RCS file: /home/ncvs/src/usr.bin/fstat/fstat.c,v retrieving revision 1.31 diff -u -r1.31 fstat.c --- src/usr.bin/fstat/fstat.c 2001/05/29 20:39:47 1.31 +++ src/usr.bin/fstat/fstat.c 2001/06/15 12:17:52 @@ -363,13 +363,20 @@ else if (file.f_type == DTYPE_PIPE) { if (checkfile == 0) pipetrans((struct pipe *)file.f_data, i, - file.f_flag); + file.f_flag); } #endif +#ifdef DTYPE_FIFO + else if (file.f_type == DTYPE_FIFO) { + if (checkfile == 0) + vtrans((struct vnode *)file.f_data, i, + file.f_flag); + } +#endif else { dprintf(stderr, - "unknown file type %d for file %d of pid %d\n", - file.f_type, i, Pid); + "unknown file type %d for file %d of pid %d\n", + file.f_type, i, Pid); } } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message