From b23294e4071543db4628253222c893931a16b91c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Sep 2009 15:24:39 -0700 Subject: s4-ldb: add --trace command line option to ldb tools This enabled LDB_FLG_ENABLE_TRACING --- source4/lib/ldb/tools/cmdline.c | 5 +++++ source4/lib/ldb/tools/cmdline.h | 1 + 2 files changed, 6 insertions(+) (limited to 'source4') diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index 8541106060..73bf2a93a7 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -44,6 +44,7 @@ static struct poptOption popt_options[] = { { "editor", 'e', POPT_ARG_STRING, &options.editor, 0, "external editor", "PROGRAM" }, { "scope", 's', POPT_ARG_STRING, NULL, 's', "search scope", "SCOPE" }, { "verbose", 'v', POPT_ARG_NONE, NULL, 'v', "increase verbosity", NULL }, + { "trace", 0, POPT_ARG_NONE, &options.tracing, 0, "enable tracing", NULL }, { "interactive", 'i', POPT_ARG_NONE, &options.interactive, 0, "input from stdin", NULL }, { "recursive", 'r', POPT_ARG_NONE, &options.recursive, 0, "recursive delete", NULL }, { "modules-path", 0, POPT_ARG_STRING, &options.modules_path, 0, "modules path", "PATH" }, @@ -220,6 +221,10 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, flags |= LDB_FLG_SHOW_BINARY; } + if (options.tracing) { + flags |= LDB_FLG_ENABLE_TRACING; + } + #if (_SAMBA_BUILD_ >= 4) /* Must be after we have processed command line options */ gensec_init(cmdline_lp_ctx); diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index 9f728fba0b..28061a5a7d 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -45,6 +45,7 @@ struct ldb_cmdline { const char *output; char **controls; int show_binary; + int tracing; }; struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv, -- cgit