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
This commit is contained in:
John Baldwin
2008-05-07 17:49:31 +00:00
parent 5e29db42b9
commit 02e50214ff
+2 -1
View File
@@ -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.
*/