From owner-freebsd-audit Thu Jun 14 3:51:29 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 531C137B403 for ; Thu, 14 Jun 2001 03:51:20 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 29351 invoked by uid 1000); 14 Jun 2001 10:49:53 -0000 Date: Thu, 14 Jun 2001 13:49:53 +0300 From: Peter Pentchev To: audit@FreeBSD.org Subject: fstat(1) patches to recognize FIFO's Message-ID: <20010614134953.E837@ringworld.oblivion.bg> Mail-Followup-To: audit@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i 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 Hi, As mentioned in PR bin/26637, fstat(1) does not currently recognize FIFO's, but prints them out as unknown file structures. The fun part is that FIFO's need absolutely no additional work, they just need to be printed out as regular files are. Patch attached. G'luck, Peter -- I've heard that this sentence is a rumor. 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/14 10:48:52 @@ -366,6 +366,13 @@ 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", To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message