Date: Fri, 15 Jun 2001 15:19:06 +0300 From: Peter Pentchev <roam@orbitel.bg> To: Dima Dorfman <dima@unixfreak.org> Cc: audit@FreeBSD.org Subject: Re: fstat(1) patches to recognize FIFO's Message-ID: <20010615151906.H94445@ringworld.oblivion.bg> In-Reply-To: <20010614221129.A33673E28@bazooka.unixfreak.org>; from dima@unixfreak.org on Thu, Jun 14, 2001 at 03:11:29PM -0700 References: <20010614134953.E837@ringworld.oblivion.bg> <20010614221129.A33673E28@bazooka.unixfreak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010615151906.H94445>