summaryrefslogtreecommitdiffstats
path: root/support/nfs/xlog.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2016-12-17 12:43:05 -0500
committerSteve Dickson <steved@redhat.com>2016-12-20 13:29:04 -0500
commit9f3c4c2e39928741c1a832fc2c7f2493507ced4c (patch)
tree1201cce9e460ccd698155941c6a987d417def356 /support/nfs/xlog.c
parent9a7b1e9a9f489612377276a1783583808b97e882 (diff)
downloadnfs-utils-9f3c4c2e39928741c1a832fc2c7f2493507ced4c.tar.gz
nfs-utils-9f3c4c2e39928741c1a832fc2c7f2493507ced4c.tar.xz
nfs-utils-9f3c4c2e39928741c1a832fc2c7f2493507ced4c.zip
xlog: Add common support for "debug=??" in /etc/nfs.conf
The value is from the list general, call, auth, parse, all. Most daemons recognise this in their dedicated section. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/nfs/xlog.c')
-rw-r--r--support/nfs/xlog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/support/nfs/xlog.c b/support/nfs/xlog.c
index 594ae9b..c8e4263 100644
--- a/support/nfs/xlog.c
+++ b/support/nfs/xlog.c
@@ -29,6 +29,7 @@
#include <syslog.h>
#include <errno.h>
#include "nfslib.h"
+#include "conffile.h"
#undef VERBOSE_PRINTF
@@ -125,6 +126,19 @@ xlog_sconfig(char *kind, int on)
xlog_config(tbl->df_fac, on);
}
+void
+xlog_from_conffile(char *service)
+{
+ struct conf_list *kinds;
+ struct conf_list_node *n;
+
+ kinds = conf_get_list(service, "debug");
+ if (!kinds || !kinds->cnt)
+ return;
+ TAILQ_FOREACH(n, &(kinds->fields), link)
+ xlog_sconfig(n->field, 1);
+}
+
int
xlog_enabled(int fac)
{