From 63cc3320d9b3093ce0ee9eccb8742eb2ed90f164 Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Sun, 24 May 2015 18:11:22 +0000 Subject: [PATCH] Hide vfs.pfs.trace variable if it is not used. --- sys/fs/pseudofs/pseudofs.c | 2 ++ sys/modules/pseudofs/Makefile | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index d7894af61a99..1824d0b005e2 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -52,9 +52,11 @@ static MALLOC_DEFINE(M_PFSNODES, "pfs_nodes", "pseudofs nodes"); SYSCTL_NODE(_vfs, OID_AUTO, pfs, CTLFLAG_RW, 0, "pseudofs"); +#ifdef PSEUDOFS_TRACE int pfs_trace; SYSCTL_INT(_vfs_pfs, OID_AUTO, trace, CTLFLAG_RW, &pfs_trace, 0, "enable tracing of pseudofs vnode operations"); +#endif #if PFS_FSNAMELEN != MFSNAMELEN #error "PFS_FSNAMELEN is not equal to MFSNAMELEN" diff --git a/sys/modules/pseudofs/Makefile b/sys/modules/pseudofs/Makefile index d5696c5c4795..6ddb74929f94 100644 --- a/sys/modules/pseudofs/Makefile +++ b/sys/modules/pseudofs/Makefile @@ -23,4 +23,10 @@ EXPORT_SYMS= pfs_mount \ pfs_enable \ pfs_destroy +.if !defined(KERNBUILDDIR) +.if defined(PSEUDOFS_TRACE) +CFLAGS+=-DPSEUDOFS_TRACE +.endif +.endif + .include