Date: Thu, 3 Nov 2016 14:40:34 +0000 (UTC) From: Edward Tomasz Napierala <trasz@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: r308253 - stable/11/sys/fs/autofs Message-ID: <201611031440.uA3EeYZ4008510@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Nov 3 14:40:34 2016 New Revision: 308253 URL: https://svnweb.freebsd.org/changeset/base/308253 Log: MFC r303961: Implement autofs_print(), for improved debugging experience. Modified: stable/11/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/11/sys/fs/autofs/autofs_vnops.c Thu Nov 3 14:36:57 2016 (r308252) +++ stable/11/sys/fs/autofs/autofs_vnops.c Thu Nov 3 14:40:34 2016 (r308253) @@ -331,6 +331,21 @@ autofs_mkdir(struct vop_mkdir_args *ap) return (error); } +static int +autofs_print(struct vop_print_args *ap) +{ + struct vnode *vp; + struct autofs_node *anp; + + vp = ap->a_vp; + anp = vp->v_data; + + printf(" name \"%s\", fileno %d, cached %d, wildcards %d\n", + anp->an_name, anp->an_fileno, anp->an_cached, anp->an_wildcards); + + return (0); +} + /* * Write out a single 'struct dirent', based on 'name' and 'fileno' arguments. */ @@ -531,6 +546,7 @@ struct vop_vector autofs_vnodeops = { .vop_link = VOP_EOPNOTSUPP, .vop_mkdir = autofs_mkdir, .vop_mknod = VOP_EOPNOTSUPP, + .vop_print = autofs_print, .vop_read = VOP_EOPNOTSUPP, .vop_readdir = autofs_readdir, .vop_remove = VOP_EOPNOTSUPP,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611031440.uA3EeYZ4008510>