diff options
author | jhb <jhb@FreeBSD.org> | 2008-05-07 17:49:31 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-05-07 17:49:31 +0000 |
commit | ced693ce3c32463d97137e4a965d1e4b8da75929 (patch) | |
tree | ffe6c6cd50859f4ac92122e2ef4310d328310f92 | |
parent | e746e8c3f69fa3dce820771a56d6d0eb835585af (diff) | |
download | FreeBSD-src-ced693ce3c32463d97137e4a965d1e4b8da75929.zip FreeBSD-src-ced693ce3c32463d97137e4a965d1e4b8da75929.tar.gz |
Only output details about the current working directory of a process if
the vnode pointer is not NULL. This avoids spurious warnings in fstat -v
output for kernel processes.
MFC after: 1 week
PR: amd64/123456
Submitted by: KOIE Hidetaka | hide koie.org
-rw-r--r-- | usr.bin/fstat/fstat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index bc6467a1..0907c49d 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -348,7 +348,8 @@ dofiles(struct kinfo_proc *kp) /* * current working directory vnode */ - vtrans(filed.fd_cdir, CDIR, FREAD); + if (filed.fd_cdir) + vtrans(filed.fd_cdir, CDIR, FREAD); /* * jail root, if any. */ |