summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2001-06-18 06:29:31 +0000
committerroam <roam@FreeBSD.org>2001-06-18 06:29:31 +0000
commit70e687ffe387af58a7d533f119a1fc01ad91fc29 (patch)
tree2543128dc25d1b1e2b25d41dce54eaa15d1a182c /usr.bin
parent4c51e07cb56294605c0ed4bc0ca70602438ccd79 (diff)
downloadFreeBSD-src-70e687ffe387af58a7d533f119a1fc01ad91fc29.zip
FreeBSD-src-70e687ffe387af58a7d533f119a1fc01ad91fc29.tar.gz
Teach fstat(1) about FIFO's - it's OK to display them as regular files.
While I'm here, fix two second-level indents to be four spaces. Reviewed by: dd, -audit
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fstat/fstat.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index c9d0211..1ba6622 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -363,13 +363,20 @@ dofiles(kp)
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);
}
}
}
OpenPOWER on IntegriCloud