diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-06-15 04:20:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-06-15 04:20:00 +0000 |
commit | 53a176b4ab49f0631c3e478055286d9e4e625d32 (patch) | |
tree | d2e5b24f8eaec57ea8ceae6f934dc17d7ca83a8c | |
parent | 5bb8cf8ff530826f52b0223a47f5d185bd303f2c (diff) |
Do not print non-vnode information if asked to report information on a
particular file, regression introduced in 1.66 and reported by Navan Carson
on misc@.
-rw-r--r-- | usr.bin/fstat/fstat.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 7ea6e118447..afb704630f2 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.66 2009/06/11 21:09:46 chl Exp $ */ +/* $OpenBSD: fstat.c,v 1.67 2009/06/15 04:19:59 miod Exp $ */ /* * Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com> @@ -53,7 +53,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: fstat.c,v 1.66 2009/06/11 21:09:46 chl Exp $"; +static char *rcsid = "$OpenBSD: fstat.c,v 1.67 2009/06/15 04:19:59 miod Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -278,19 +278,24 @@ dofiles(struct kinfo_file2 *kf) vtrans(kf); break; case DTYPE_SOCKET: - socktrans(kf); + if (checkfile == 0) + socktrans(kf); break; case DTYPE_PIPE: - pipetrans(kf); + if (checkfile == 0) + pipetrans(kf); break; case DTYPE_KQUEUE: - kqueuetrans(kf); + if (checkfile == 0) + kqueuetrans(kf); break; case DTYPE_CRYPTO: - cryptotrans(kf); + if (checkfile == 0) + cryptotrans(kf); break; case DTYPE_SYSTRACE: - systracetrans(kf); + if (checkfile == 0) + systracetrans(kf); break; default: if (vflg) { |