Date: Tue, 6 Feb 2018 19:13:44 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328944 - stable/11/sys/kern Message-ID: <201802061913.w16JDiP8047547@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Tue Feb 6 19:13:44 2018 New Revision: 328944 URL: https://svnweb.freebsd.org/changeset/base/328944 Log: MFC of 328643. fix vn_printf listing of its union Modified: stable/11/sys/kern/vfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Tue Feb 6 19:09:49 2018 (r328943) +++ stable/11/sys/kern/vfs_subr.c Tue Feb 6 19:13:44 2018 (r328944) @@ -3355,8 +3355,25 @@ vn_printf(struct vnode *vp, const char *fmt, ...) va_end(ap); printf("%p: ", (void *)vp); printf("tag %s, type %s\n", vp->v_tag, typename[vp->v_type]); - printf(" usecount %d, writecount %d, refcount %d mountedhere %p\n", - vp->v_usecount, vp->v_writecount, vp->v_holdcnt, vp->v_mountedhere); + printf(" usecount %d, writecount %d, refcount %d", + vp->v_usecount, vp->v_writecount, vp->v_holdcnt); + switch (vp->v_type) { + case VDIR: + printf(" mountedhere %p\n", vp->v_mountedhere); + break; + case VCHR: + printf(" rdev %p\n", vp->v_rdev); + break; + case VSOCK: + printf(" socket %p\n", vp->v_unpcb); + break; + case VFIFO: + printf(" fifoinfo %p\n", vp->v_fifoinfo); + break; + default: + printf("\n"); + break; + } buf[0] = '\0'; buf[1] = '\0'; if (vp->v_vflag & VV_ROOT)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802061913.w16JDiP8047547>