Date: Thu, 11 Aug 2016 14:27:23 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303961 - head/sys/fs/autofs Message-ID: <201608111427.u7BERNXs031710@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Aug 11 14:27:23 2016 New Revision: 303961 URL: https://svnweb.freebsd.org/changeset/base/303961 Log: Implement autofs_print(), for improved debugging experience. MFC after: 1 month Modified: head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs_vnops.c ============================================================================== --- head/sys/fs/autofs/autofs_vnops.c Thu Aug 11 13:54:17 2016 (r303960) +++ head/sys/fs/autofs/autofs_vnops.c Thu Aug 11 14:27:23 2016 (r303961) @@ -329,6 +329,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. */ @@ -529,6 +544,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?201608111427.u7BERNXs031710>