From 53a176b4ab49f0631c3e478055286d9e4e625d32 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 15 Jun 2009 04:20:00 +0000 Subject: 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@. --- usr.bin/fstat/fstat.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'usr.bin') 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 @@ -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 @@ -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) { -- cgit v1.2.3