Date: Thu, 14 Jun 2001 13:49:53 +0300 From: Peter Pentchev <roam@orbitel.bg> To: audit@FreeBSD.org Subject: fstat(1) patches to recognize FIFO's Message-ID: <20010614134953.E837@ringworld.oblivion.bg>
index | next in thread | raw e-mail
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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010614134953.E837>
